refactor: move copy function to utils.js

This commit is contained in:
Shishkevich D.
2025-03-07 07:27:33 +00:00
parent 7483fb2ec5
commit 26bf693dbd
6 changed files with 63 additions and 43 deletions

View File

@@ -28,10 +28,12 @@
this.visible = true;
},
copy: function (content = '') {
copyToClipboard(content).then(() => {
app.$message.success('{{ i18n "copied" }}')
this.close();
})
ClipboardManager
.copyText(content)
.then(() => {
app.$message.success('{{ i18n "copied" }}')
this.close();
})
},
close: function () {
this.visible = false;