From 3b2435875ca1fa77f38697f3abaf28a6dcd1c232 Mon Sep 17 00:00:00 2001 From: Kangyang Ji Date: Sun, 12 Apr 2026 16:47:40 +0100 Subject: [PATCH] fix: type use of defineStore in @/stores (#7490) --- dashboard/src/stores/auth.ts | 3 +-- dashboard/src/stores/common.js | 3 +-- dashboard/src/stores/customizer.ts | 3 +-- dashboard/src/stores/personaStore.ts | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dashboard/src/stores/auth.ts b/dashboard/src/stores/auth.ts index 474ab8986..340e97729 100644 --- a/dashboard/src/stores/auth.ts +++ b/dashboard/src/stores/auth.ts @@ -2,8 +2,7 @@ import { defineStore } from 'pinia'; import { router } from '@/router'; import axios from 'axios'; -export const useAuthStore = defineStore({ - id: 'auth', +export const useAuthStore = defineStore("auth", { state: () => ({ // @ts-ignore username: '', diff --git a/dashboard/src/stores/common.js b/dashboard/src/stores/common.js index ed351d13f..cc844423e 100644 --- a/dashboard/src/stores/common.js +++ b/dashboard/src/stores/common.js @@ -1,8 +1,7 @@ import { defineStore } from 'pinia'; import axios from 'axios'; -export const useCommonStore = defineStore({ - id: 'common', +export const useCommonStore = defineStore("common", { state: () => ({ // @ts-ignore eventSource: null, diff --git a/dashboard/src/stores/customizer.ts b/dashboard/src/stores/customizer.ts index 28e3423ef..82d46ce50 100644 --- a/dashboard/src/stores/customizer.ts +++ b/dashboard/src/stores/customizer.ts @@ -1,8 +1,7 @@ import { defineStore } from 'pinia'; import config from '@/config'; -export const useCustomizerStore = defineStore({ - id: 'customizer', +export const useCustomizerStore = defineStore("customizer", { state: () => ({ Sidebar_drawer: config.Sidebar_drawer, Customizer_drawer: config.Customizer_drawer, diff --git a/dashboard/src/stores/personaStore.ts b/dashboard/src/stores/personaStore.ts index e27354f1d..4f6f7985e 100644 --- a/dashboard/src/stores/personaStore.ts +++ b/dashboard/src/stores/personaStore.ts @@ -43,8 +43,7 @@ export interface ReorderItem { sort_order: number; } -export const usePersonaStore = defineStore({ - id: 'persona', +export const usePersonaStore = defineStore("persona", { state: () => ({ folderTree: [] as FolderTreeNode[], currentFolderId: null as string | null,