|
@@ -22,13 +22,15 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
textContent() {
|
|
|
- return this.$slots.default || this.text
|
|
|
+ const slot = this.$slots.default || []
|
|
|
+ const text = slot[0]?.text || this.text
|
|
|
+ console.log(text)
|
|
|
+ return text
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
copyText() {
|
|
|
- const slot = this.$slots.default || []
|
|
|
- const text = slot[0]?.text || this.text
|
|
|
+ const text = this.textContent
|
|
|
if (text) {
|
|
|
copy(text)
|
|
|
if (this.hint) {
|