【vue】document加add事件与去掉事件

【vue】document加add事件与去掉事件,第1张

mounted() {
  document.addEventListener("click", this.clickFunction)
},
destroyed() {
  document.removeEventListener("click", this.clickFunction)
},
methods: {
  clickFunction(e){}
}

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/878013.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存