From fdde8fe58cc3186f53bc559aba80821a60bd04d9 Mon Sep 17 00:00:00 2001 From: SaarHV Date: Wed, 11 Jan 2023 21:18:14 +0800 Subject: [PATCH] Use pinia to store the tagsView routes --- src/stores/tagsViewRoutes.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/stores/tagsViewRoutes.ts diff --git a/src/stores/tagsViewRoutes.ts b/src/stores/tagsViewRoutes.ts new file mode 100644 index 0000000..04d6af7 --- /dev/null +++ b/src/stores/tagsViewRoutes.ts @@ -0,0 +1,20 @@ +import { defineStore } from 'pinia'; +import { TagsViewRoutesState } from './interface'; +import { Session } from '/@/utils/storage'; + +// TagsView routing List +export const useTagsViewRoutes = defineStore('tagsViewRoutes', { + state: (): TagsViewRoutesState => ({ + tagsViewRoutes: [], + isTagsViewCurrenFull: false, + }), + actions: { + async setTagsViewRoutes(data: Array) { + this.tagsViewRoutes = data; + }, + setCurrenFullscreen(bool: Boolean) { + Session.set('isTagsViewCurrenFull', bool); + this.isTagsViewCurrenFull = bool; + }, + }, +}); -- Gitee