perf : issue 、recordRule 页面复制功能组件化

This commit is contained in:
likexuan
2022-08-17 10:55:21 +08:00
parent fcce0fd743
commit 0a841fc4ac
3 changed files with 60 additions and 17 deletions

View File

@@ -0,0 +1,32 @@
<template>
<div class="document-copy-block">
<span class="document-copy-text">
<slot name="copy-text"></slot>
</span>
<i v-if="copyData" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(copyData)" :title="$t('overall.copyText')"></i>
</div>
</template>
<script>
export default {
name: 'copy',
props: {
copyData: String
},
data () {
return {
}
},
methods: {
onCopy (txt) {
this.$copyText(txt).then(() => {
this.$message.success({ message: this.$t('overall.copySuccess') })
})
}
}
}
</script>
<style>
</style>