perf: 同步完整版代码

This commit is contained in:
xiaoxian521
2022-04-06 13:42:49 +08:00
parent 53e19f7971
commit bc8a0f3b35
23 changed files with 496 additions and 400 deletions

View File

@@ -89,7 +89,13 @@ export const useMultiTagsStore = defineStore({
}
break;
case "splice":
this.multiTags.splice(position?.startIndex, position?.length);
if (!position) {
const index = this.multiTags.findIndex(v => v.path === value);
if (index === -1) return;
this.multiTags.splice(index, 1);
} else {
this.multiTags.splice(position?.startIndex, position?.length);
}
this.tagsCache(this.multiTags);
return this.multiTags;
case "slice":

View File

@@ -1,9 +1,9 @@
import { defineStore } from "pinia";
import { store } from "/@/store";
import { cacheType } from "./types";
import { constantMenus } from "/@/router";
import { cloneDeep } from "lodash-unified";
import { RouteConfigs } from "/@/layout/types";
import { constantMenus } from "/@/router/modules";
import { ascending, filterTree } from "/@/router/utils";
export const usePermissionStore = defineStore({