This commit is contained in:
qsh
2024-08-01 18:41:37 +08:00
parent feccb2a1fa
commit 605151c5c8
17 changed files with 143 additions and 137 deletions

View File

@@ -116,11 +116,11 @@
<script lang="ts" name="SystemMenuForm" setup>
// import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import * as MenuApi from '@/api/system/menu'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { CACHE_KEY } from '@/hooks/web/useCache'
import { CommonStatusEnum, SystemMenuTypeEnum } from '@/utils/constants'
import { defaultProps, handleTree } from '@/utils/tree'
import cache from '@/plugins/cache'
const { wsCache } = useCache()
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
@@ -218,7 +218,7 @@ const submitForm = async () => {
} finally {
formLoading.value = false
// 清空,从而触发刷新
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
cache.local.delete(CACHE_KEY.ROLE_ROUTERS)
}
}

View File

@@ -88,8 +88,8 @@
import { handleTree } from '@/utils/tree'
import * as MenuApi from '@/api/system/menu'
import MenuForm from './MenuForm.vue'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()
import { CACHE_KEY } from '@/hooks/web/useCache'
import cache from '@/plugins/cache'
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
@@ -145,7 +145,7 @@ const refreshMenu = async () => {
try {
await message.confirm('即将更新缓存刷新浏览器!', '刷新菜单缓存')
// 清空,从而触发刷新
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
cache.local.delete(CACHE_KEY.ROLE_ROUTERS)
// 刷新浏览器
location.reload()
} catch {}