diff --git a/front/src/views/project/ShareConfig/index.vue b/front/src/views/project/ShareConfig/index.vue index 8b636d4b194b6fbb9a4e2c8af07ba45675c4a743..d3a3fe061894753932c20720c7c3ed8ef702edb4 100644 --- a/front/src/views/project/ShareConfig/index.vue +++ b/front/src/views/project/ShareConfig/index.vue @@ -16,7 +16,7 @@ @@ -30,7 +30,7 @@ @@ -492,33 +492,8 @@ export default { }) }) }, - copyUrl(url) { - navigator.clipboard.writeText(url).then(() => { - this.$message({ - message: this.$t('copySuccess'), - type: 'success', - duration: 2000 - }); - }).catch(() => { - this.$message({ - message: this.$t('copyFailed'), - type: 'error' - }); - }); - }, - copyPassword(password) { - navigator.clipboard.writeText(password).then(() => { - this.$message({ - message: this.$t('copySuccess'), - type: 'success', - duration: 2000 - }); - }).catch(() => { - this.$message({ - message: this.$t('copyFailed'), - type: 'error' - }); - }); + copy(text) { + this.copyText(text) } } }