标签:size lin alt add eve ace str nbsp ons
created() {
window.addEventListener(
‘beforeunload‘
, e =>
this
.test(e))
}
methods: {
test
(e) {
console.log(
‘刷新或关闭‘
)
// ...
}
}
destroyed() {
window.removeEventListener(
‘beforeunload‘
, e => this
.test(e)
)
}
标签:size lin alt add eve ace str nbsp ons
原文地址:https://www.cnblogs.com/500m/p/12109744.html