feat: update

This commit is contained in:
Fine 2023-06-21 17:18:48 +08:00
parent 9cd2871f37
commit 995eaf8318
2 changed files with 1 additions and 16 deletions

View File

@ -86,17 +86,7 @@ limitations under the License. -->
function getPathNames() { function getPathNames() {
const p = route.params; const p = route.params;
// get names console.log(route.meta);
// set names
if (appStore.pathNames.length && p.layerId === appStore.pathNames[0].layerId) {
const arr = [...appStore.pathNames, p];
const list = deduplication(arr, ["layerId", "entity", "name"]);
appStore.setPathNames(list);
} else {
appStore.setPathNames([p]);
}
// console.log(route.params);
} }
watch( watch(

View File

@ -35,7 +35,6 @@ interface AppState {
version: string; version: string;
isMobile: boolean; isMobile: boolean;
reloadTimer: Nullable<IntervalHandle>; reloadTimer: Nullable<IntervalHandle>;
pathNames: { name: string; layer: string; entity: string }[];
} }
export const appStore = defineStore({ export const appStore = defineStore({
@ -56,7 +55,6 @@ export const appStore = defineStore({
version: "", version: "",
isMobile: false, isMobile: false,
reloadTimer: null, reloadTimer: null,
pathNames: [],
}), }),
getters: { getters: {
duration(): Duration { duration(): Duration {
@ -148,9 +146,6 @@ export const appStore = defineStore({
setPageTitle(title: string) { setPageTitle(title: string) {
this.pageTitle = title; this.pageTitle = title;
}, },
setPathNames(names: { name: string; layer: string; entity: string }[]) {
this.pathNames = names;
},
runEventStack() { runEventStack() {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer); clearTimeout(this.timer);