mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-16 16:42:50 +00:00
解决 copy 指令异常
This commit is contained in:
parent
be747921b3
commit
43d3d9a89a
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front-next-vue3-vite",
|
"name": "front-next",
|
||||||
"version": "0.0.0",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
|
|||||||
@ -18,11 +18,12 @@ function copyboard() {
|
|||||||
copyboard();
|
copyboard();
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
inserted: (el: HTMLElement, binding: any) => {
|
mounted: (el: HTMLElement, binding: any) => {
|
||||||
el.className = el.className + " _copy-btn";
|
el.className = el.className + " _copy-btn";
|
||||||
el.setAttribute("data-clipboard-text", binding.value);
|
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);
|
el.setAttribute("data-clipboard-text", binding.value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user