|
@@ -54,8 +54,8 @@
|
|
|
:on-exceed="handleExceed"
|
|
|
:on-success="handleFileSuccess"
|
|
|
:on-error="excelUploadError"
|
|
|
- :on-change="handleFileChange"
|
|
|
:before-remove="beforeRemove"
|
|
|
+ :on-change="handleFileChange"
|
|
|
:auto-upload="false"
|
|
|
accept=".jpg, .png, .gif"
|
|
|
>
|
|
@@ -168,19 +168,7 @@ const uploadDialog = () => {
|
|
|
}
|
|
|
// ========== 复制相关 ==========
|
|
|
const handleCopy = async (text: string) => {
|
|
|
- let url = text
|
|
|
- let oInput = document.createElement('textarea')
|
|
|
- oInput.value = url
|
|
|
- document.body.appendChild(oInput)
|
|
|
- oInput.select() // 选择对象;
|
|
|
- // console.log(oInput.value)
|
|
|
- document.execCommand('Copy') // 执行浏览器复制命令
|
|
|
- message.success(t('common.copySuccess'))
|
|
|
- oInput.remove()
|
|
|
// const { copy, copied, isSupported } = useClipboard({ source: text, read: true })
|
|
|
- // console.log(copy, 'copycopycopy')
|
|
|
- // console.log(copied, 'copiedcopiedcopied')
|
|
|
- // console.log(isSupported, 'isSupportedisSupportedisSupported')
|
|
|
// if (!isSupported.value) {
|
|
|
// message.error(t('common.copyError'))
|
|
|
// } else {
|
|
@@ -189,5 +177,14 @@ const handleCopy = async (text: string) => {
|
|
|
// message.success(t('common.copySuccess'))
|
|
|
// }
|
|
|
// }
|
|
|
+ let url = text
|
|
|
+ let oInput = document.createElement('textarea')
|
|
|
+ oInput.value = url
|
|
|
+ document.body.appendChild(oInput)
|
|
|
+ oInput.select() // 选择对象;
|
|
|
+ // console.log(oInput.value)
|
|
|
+ document.execCommand('Copy') // 执行浏览器复制命令
|
|
|
+ message.success(t('common.copySuccess'))
|
|
|
+ oInput.remove()
|
|
|
}
|
|
|
</script>
|