mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-23 18:00:21 +08:00
🐛 fix(TabsView): 判断page是否存在
-当被刷新标签页未被打开时,进行刷新标签操作page报错,故新增判断
This commit is contained in:
parent
17e41ce1fc
commit
f5e2c11387
@ -136,6 +136,7 @@ export default {
|
||||
},
|
||||
refresh (key, page) {
|
||||
page = page || this.pageList.find(item => item.path === key)
|
||||
if(page){
|
||||
page.loading = true
|
||||
this.clearCache(page)
|
||||
if (key === this.activePage) {
|
||||
@ -144,6 +145,7 @@ export default {
|
||||
// 其实刷新很快,加这个延迟纯粹为了 loading 状态多展示一会儿,让用户感知刷新这一过程
|
||||
setTimeout(() => page.loading = false, 500)
|
||||
}
|
||||
}
|
||||
},
|
||||
onContextmenu(pageKey, e) {
|
||||
if (pageKey) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user