remove clip event listener before destroy

This commit is contained in:
Weidi Deng 2020-12-11 10:46:02 +08:00
parent 3d2bb9170d
commit f2c0fd08e3

View File

@ -51,7 +51,8 @@ export default {
computed: mapState([ 'user' ]), computed: mapState([ 'user' ]),
data: function () { data: function () {
return { return {
links: [] links: [],
clip: null
} }
}, },
async created () { async created () {
@ -73,6 +74,9 @@ export default {
this.$showSuccess(this.$t('success.linkCopied')) this.$showSuccess(this.$t('success.linkCopied'))
}) })
}, },
beforeDestroy () {
this.clip.destroy()
},
methods: { methods: {
deleteLink: async function (event, link) { deleteLink: async function (event, link) {
event.preventDefault() event.preventDefault()