|
|
@@ -10,24 +10,26 @@ import store from './store'
|
|
|
export default {
|
|
|
name: 'App',
|
|
|
created() {
|
|
|
+ const self = this
|
|
|
+ console.log(store.state.app.language)
|
|
|
document.body.addEventListener('plugin_web_update_notice', (e) => {
|
|
|
const { version, options } = e.detail
|
|
|
// write some code, show your custom notification and etc.
|
|
|
console.log(version, options)
|
|
|
- alert('System update!')
|
|
|
- this.$confirm('检测到未保存的内容,是否在离开页面前保存修改?', '确认信息', {
|
|
|
+ // alert('System update!')
|
|
|
+ self.$confirm('检测到未保存的内容,是否在离开页面前保存修改?', '确认信息', {
|
|
|
distinguishCancelAndClose: true,
|
|
|
confirmButtonText: '保存',
|
|
|
cancelButtonText: '放弃修改'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- this.$message({
|
|
|
+ self.$message({
|
|
|
type: 'info',
|
|
|
message: '保存修改'
|
|
|
})
|
|
|
})
|
|
|
.catch(action => {
|
|
|
- this.$message({
|
|
|
+ self.$message({
|
|
|
type: 'info',
|
|
|
message: action === 'cancel'
|
|
|
? '放弃保存并离开页面'
|