xiaozy_0517
parent
065a1729b1
commit
3b2691214e
1 changed files with 12 additions and 12 deletions
@ -1,15 +1,15 @@ |
|||||||
import Vue from "vue"; |
import Vue from 'vue' |
||||||
import Clipboard from "clipboard"; |
import Clipboard from 'clipboard' |
||||||
|
|
||||||
export default function (event) { |
export default function (event) { |
||||||
const clipboard = new Clipboard(event.target); |
const clipboard = new Clipboard(event.target) |
||||||
clipboard.on("success", () => { |
clipboard.on('success', () => { |
||||||
Vue.prototype.$message.success("复制成功"); |
Vue.prototype.$message.success('复制成功') |
||||||
clipboard.destroy(); |
clipboard.destroy() |
||||||
}); |
}) |
||||||
clipboard.on("error", () => { |
clipboard.on('error', () => { |
||||||
Vue.prototype.$message.error("复制失败"); |
Vue.prototype.$message.error('复制失败') |
||||||
clipboard.destroy(); |
clipboard.destroy() |
||||||
}); |
}) |
||||||
clipboard.onClick(event); |
clipboard.onClick(event) |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue