perf : onCopy 方法提取到 mainMixinFun.js文件

This commit is contained in:
likexuan
2022-06-22 16:25:25 +08:00
parent b4aafb6fed
commit 6507b23257
3 changed files with 7 additions and 6 deletions

View File

@@ -90,6 +90,11 @@ export default {
const format = fmt || localStorage.getItem('nz-default-dateFormat')
const date = moment.tz(str, format, offset).valueOf()
return date
},
onCopy (txt) {
this.$copyText(txt).then(() => {
this.$message.success({ message: this.$t('overall.copySuccess') })
})
}
}
}