From bbe79d13fd15ec19a78e8a649666b34b0ee3a40d Mon Sep 17 00:00:00 2001 From: lijingjia Date: Tue, 24 Sep 2024 13:58:49 +0800 Subject: [PATCH] =?UTF-8?q?9.24=E7=A6=85=E9=81=93bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seaexport/detail/modules/basicInfo.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/operation/seaexport/detail/modules/basicInfo.vue b/src/views/operation/seaexport/detail/modules/basicInfo.vue index 8e3b713e..07edfa9a 100644 --- a/src/views/operation/seaexport/detail/modules/basicInfo.vue +++ b/src/views/operation/seaexport/detail/modules/basicInfo.vue @@ -198,13 +198,23 @@ } // 复制单号 const copyTxt = (v, key) => { - navigator.clipboard.writeText(v.values[key]) - createMessage.success('复制成功') + const el = document.createElement('input') + el.setAttribute('value', v.values[key]) + document.body.appendChild(el) + el.select() + document.execCommand('copy') + document.body.removeChild(el) + createMessage.success('复制成功!') } // 复制委托编号 const copyNo = (v) => { - navigator.clipboard.writeText(v) - createMessage.success('复制成功') + const el = document.createElement('input') + el.setAttribute('value', v) + document.body.appendChild(el) + el.select() + document.execCommand('copy') + document.body.removeChild(el) + createMessage.success('复制成功!') } // 编辑委托编号 const customerNoRef = ref(null)