diff --git a/package.json b/package.json index 0d651be..9a54336 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "front-next-vue3-vite", - "version": "0.0.0", + "name": "front-next", + "version": "0.0.1", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build", diff --git a/src/cool/modules/copy/directives/index.ts b/src/cool/modules/copy/directives/index.ts index 08a88c8..ed2bfac 100644 --- a/src/cool/modules/copy/directives/index.ts +++ b/src/cool/modules/copy/directives/index.ts @@ -18,11 +18,12 @@ function copyboard() { copyboard(); export default { - inserted: (el: HTMLElement, binding: any) => { + mounted: (el: HTMLElement, binding: any) => { el.className = el.className + " _copy-btn"; el.setAttribute("data-clipboard-text", binding.value); }, - update: (el: HTMLElement, binding: any) => { + beforeUpdate: (el: HTMLElement, binding: any) => { + console.log(el); el.setAttribute("data-clipboard-text", binding.value); } };