NEZ-807 fix: 标签关闭 提示功能
This commit is contained in:
17
nezha-fronted/src/components/common/mixin/editRigthBox.js
Normal file
17
nezha-fronted/src/components/common/mixin/editRigthBox.js
Normal file
@@ -0,0 +1,17 @@
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
isEdit: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if( this.isEdit ) {
|
||||
window.onbeforeunload = () => {
|
||||
return window.confirm("确认操作吗?")
|
||||
}
|
||||
}
|
||||
},
|
||||
destroyed () {
|
||||
window.onbeforeunload = null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user