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() {
const p = route.params;
// get names
// 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);
console.log(route.meta);
}
watch(

View File

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