NEZ-807 fix: 标签关闭 提示功能

This commit is contained in:
@changcode
2021-07-05 14:43:47 +08:00
parent 6718e194d0
commit d33f6ff598
29 changed files with 164 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
export default {
data () {
return {
isEdit: false
}
},
mounted () {
if( this.isEdit ) {
window.onbeforeunload = () => {
return window.confirm("确认操作吗?")
}
}
},
destroyed () {
window.onbeforeunload = null
}
}