✨ 增加刷新/关闭编辑界面提示 https://github.com/rymcu/forest/issues/34
This commit is contained in:
parent
9e0f74f8c0
commit
7763a1cc0d
@ -239,6 +239,17 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('beforeunload', e => {
|
||||
e = e || window.event;
|
||||
|
||||
// 兼容IE8和Firefox 4之前的版本
|
||||
if (e) {
|
||||
e.returnValue = '关闭提示';
|
||||
}
|
||||
|
||||
// Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
|
||||
return '关闭提示';
|
||||
});
|
||||
let _ts = this;
|
||||
this.$store.commit('setActiveMenu', 'postAdminTag');
|
||||
this.$axios.$get('/api/upload/simple/token').then(function (res) {
|
||||
|
@ -255,6 +255,17 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
window.addEventListener('beforeunload', e => {
|
||||
e = e || window.event;
|
||||
|
||||
// 兼容IE8和Firefox 4之前的版本
|
||||
if (e) {
|
||||
e.returnValue = '关闭提示';
|
||||
}
|
||||
|
||||
// Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
|
||||
return '关闭提示';
|
||||
});
|
||||
let _ts = this;
|
||||
_ts.$store.commit("setActiveMenu", "admin-topic-post");
|
||||
_ts.$axios.$get('/api/upload/simple/token').then(function (res) {
|
||||
|
@ -322,6 +322,17 @@
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
window.addEventListener('beforeunload', e => {
|
||||
e = e || window.event;
|
||||
|
||||
// 兼容IE8和Firefox 4之前的版本
|
||||
if (e) {
|
||||
e.returnValue = '关闭提示';
|
||||
}
|
||||
|
||||
// Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
|
||||
return '关闭提示';
|
||||
});
|
||||
let _ts = this;
|
||||
_ts.$store.commit('setActiveMenu', 'post-article');
|
||||
const responseData = await _ts.$axios.$get('/api/upload/token');
|
||||
|
@ -339,6 +339,17 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('beforeunload', e => {
|
||||
e = e || window.event;
|
||||
|
||||
// 兼容IE8和Firefox 4之前的版本
|
||||
if (e) {
|
||||
e.returnValue = '关闭提示';
|
||||
}
|
||||
|
||||
// Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
|
||||
return '关闭提示';
|
||||
});
|
||||
let _ts = this;
|
||||
_ts.$store.commit("setActiveMenu", "portfolio-post");
|
||||
this.$axios.$get('/api/upload/simple/token').then(function (res) {
|
||||
|
Loading…
Reference in New Issue
Block a user