diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 0604aa93..594a27e1 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -11,6 +11,7 @@ v-hasPermi="['system:menu:create']" @click="handleCreate()" /> + @@ -348,4 +349,18 @@ const submitForm = async () => { 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(() => { + // 清空,从而触发刷新 + wsCache.delete(CACHE_KEY.ROLE_ROUTERS) + // 刷新浏览器 + location.reload() + }) +}