diff --git a/src/main/resources/static/src/components/AppGeneratorPage.js b/src/main/resources/static/src/components/AppGeneratorPage.js index b4304a9..b5a79b5 100644 --- a/src/main/resources/static/src/components/AppGeneratorPage.js +++ b/src/main/resources/static/src/components/AppGeneratorPage.js @@ -95,6 +95,8 @@ const AppGeneratorPage = defineComponent({ * 几秒后恢复原状 */ async onCopyToClipboard(code) { + this.copied = true; + try { await navigator.clipboard.writeText(code); antd.notification.open({ @@ -119,6 +121,13 @@ const AppGeneratorPage = defineComponent({ document.execCommand('copy'); document.body.removeChild(textarea); } + + // 显示已复制图标时长 + if (this.copied) { + setTimeout(() => { + this.copied = false; + }, 2000) + } }, /* 下载全部文件 */