release: update 3.6.0

This commit is contained in:
xiaoxian521
2022-10-25 17:51:21 +08:00
parent 1003a31b4d
commit f14077bc6f
37 changed files with 555 additions and 321 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { useRouter } from "vue-router";
import { cloneDeep } from "lodash-unified";
import SearchResult from "./SearchResult.vue";
import SearchFooter from "./SearchFooter.vue";
import { useNav } from "/@/layout/hooks/useNav";
@@ -31,7 +32,7 @@ const handleSearch = useDebounceFn(search, 300);
/** 菜单树形结构 */
const menusData = computed(() => {
return deleteChildren(usePermissionStoreHook().menusTree);
return deleteChildren(cloneDeep(usePermissionStoreHook().wholeMenus));
});
const show = computed({

View File

@@ -14,6 +14,7 @@ import panel from "../panel/index.vue";
import { emitter } from "/@/utils/mitt";
import { resetRouter } from "/@/router";
import { templateRef } from "@vueuse/core";
import { removeToken } from "/@/utils/auth";
import { routerArrays } from "/@/layout/types";
import { useNav } from "/@/layout/hooks/useNav";
import { useAppStoreHook } from "/@/store/modules/app";
@@ -131,7 +132,7 @@ const multiTagsCacheChange = () => {
/** 清空缓存并返回登录页 */
function onReset() {
router.push("/login");
removeToken();
storageLocal.clear();
storageSession.clear();
const { Grey, Weak, MultiTagsCache, EpThemeColor, Layout } = getConfig();
@@ -140,6 +141,7 @@ function onReset() {
useMultiTagsStoreHook().multiTagsCacheChange(MultiTagsCache);
toggleClass(Grey, "html-grey", document.querySelector("html"));
toggleClass(Weak, "html-weakness", document.querySelector("html"));
router.push("/login");
useMultiTagsStoreHook().handleTags("equal", [...routerArrays]);
resetRouter();
}

View File

@@ -51,6 +51,12 @@ const { title } = useNav();
margin-top: 5px;
.sidebar-title {
display: block;
width: 160px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: left;
color: #1890ff;
font-weight: 600;
font-size: 20px;

View File

@@ -48,7 +48,7 @@ nextTick(() => {
});
watch(
() => route.path,
() => [route.path, usePermissionStoreHook().wholeMenus],
() => {
getDefaultActive(route.path);
}

View File

@@ -27,7 +27,7 @@ const menuData = computed(() => {
: usePermissionStoreHook().wholeMenus;
});
function getSubMenuData(path) {
function getSubMenuData(path: string) {
// path的上级路由组成的数组
const parentPathArr = getParentPaths(
path,
@@ -41,6 +41,7 @@ function getSubMenuData(path) {
if (!parenetRoute?.children) return;
subMenuData.value = parenetRoute?.children;
}
getSubMenuData(route.path);
onBeforeMount(() => {
@@ -50,7 +51,7 @@ onBeforeMount(() => {
});
watch(
() => route.path,
() => [route.path, usePermissionStoreHook().wholeMenus],
() => {
getSubMenuData(route.path);
menuSelect(route.path, routers);