
mounted() {
//d创建监听
window.addEventListener("popstate", this.listenerPopstate, true);
},
destroyed() {
//销毁监听
window.removeEventListener("popstate", this.listenerPopstate, true);
},
methods: {
//监听方法
listenerPopstate() {
ZWJSBridge.close();
}
}
react如何利用addEventListener监听关闭Modal弹框
标签: removeEventList, 监听, 监听事件
上面是“vuejs用mounted创建监听事件,用destroyed销毁监听”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_1435.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

一款轻量级、开源且功能丰富的网络速度测试工具—— LibreSpeed
InternVL-U多模态模型使用入口,上海AI实验室正式推出,仅40亿参数的轻量级模型
深度Deepin官网:一款基于Linux内核的开源GNU/Linux操作系统
translate.js