mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-21 12:32:25 +00:00
提升性能 修复前端tab页面bug 增加ws插件
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gin-vue-admin",
|
||||
"version": "0.1.0",
|
||||
"version": "2.3.5 ",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "node openDocument.js && vue-cli-service serve",
|
||||
|
||||
@@ -74,6 +74,9 @@ export default {
|
||||
}
|
||||
},
|
||||
$route(to, now) {
|
||||
if (to.name === 'Login') {
|
||||
return
|
||||
}
|
||||
this.historys = this.historys.filter(item => !item.meta.closeTab)
|
||||
this.setTab(to)
|
||||
sessionStorage.setItem('historys', JSON.stringify(this.historys))
|
||||
@@ -84,6 +87,14 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 全局监听 关闭当前页面函数
|
||||
emitter.on('closeThisPage', () => {
|
||||
this.removeTab(this.name(this.$route))
|
||||
})
|
||||
// 全局监听 关闭所有页面函数
|
||||
emitter.on('closeAllPage', () => {
|
||||
this.closeAll()
|
||||
})
|
||||
emitter.on('mobile', isMobile => {
|
||||
this.isMobile = isMobile
|
||||
})
|
||||
@@ -109,12 +120,6 @@ export default {
|
||||
}
|
||||
this.setTab(this.$route)
|
||||
},
|
||||
mounted() {
|
||||
// 全局监听 关闭当前页面函数
|
||||
emitter.on('closeThisPage', () => {
|
||||
this.removeTab(this.name(this.$route))
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
emitter.off('collapse')
|
||||
emitter.off('mobile')
|
||||
|
||||
@@ -212,6 +212,7 @@ export default {
|
||||
authorityId: id
|
||||
})
|
||||
if (res.code === 0) {
|
||||
emitter.emit('closeAllPage')
|
||||
window.location.reload()
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user