菜单管理:添加刷新菜单缓存按钮

This commit is contained in:
shizhong 2023-06-13 13:43:12 +08:00
parent 4601bd3428
commit 67f6db22c2

View File

@ -350,17 +350,15 @@ const isExternal = (path: string) => {
return /^(https?:|mailto:|tel:)/.test(path)
}
/** 刷新菜单缓存按钮操作 */
const refreshMenu = () => {
ElMessageBox.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存', {
confirmButtonText: t('common.ok'),
cancelButtonText: t('common.cancel'),
type: 'warning'
}).then(() => {
const refreshMenu = async () => {
try {
await message.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存')
//
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
//
location.reload()
})
} catch {}
}
</script>