提交 f2b0fd2d 编写于 作者: D DCloud_LXH

fix: remove ?. usage

上级 2608fc26
export function getClipboardData () {
const pasteText = document.getElementById('#clipboard')
const data = pasteText?.value
const data = pasteText ? pasteText.value : undefined
if (data) {
return {
data,
......@@ -18,7 +18,7 @@ export function setClipboardData ({
data
}) {
const pasteText = document.getElementById('#clipboard')
pasteText?.remove()
pasteText && pasteText.remove()
const textarea = document.createElement('textarea')
textarea.id = '#clipboard'
textarea.style.position = 'absolute'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册