菜单管理:添加刷新菜单缓存按钮
This commit is contained in:
parent
4601bd3428
commit
67f6db22c2
@ -350,17 +350,15 @@ const isExternal = (path: string) => {
|
|||||||
return /^(https?:|mailto:|tel:)/.test(path)
|
return /^(https?:|mailto:|tel:)/.test(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** 刷新菜单缓存按钮操作 */
|
/** 刷新菜单缓存按钮操作 */
|
||||||
const refreshMenu = () => {
|
const refreshMenu = async () => {
|
||||||
ElMessageBox.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存', {
|
try {
|
||||||
confirmButtonText: t('common.ok'),
|
await message.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存')
|
||||||
cancelButtonText: t('common.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
// 清空,从而触发刷新
|
// 清空,从而触发刷新
|
||||||
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
|
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
|
||||||
// 刷新浏览器
|
// 刷新浏览器
|
||||||
location.reload()
|
location.reload()
|
||||||
})
|
} catch {}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user