LoongPanel-Asp/web/strores/DataStore.ts

20 lines
410 B
TypeScript
Raw Normal View History

2024-06-22 10:54:02 +08:00
import {defineStore} from "pinia";
import {useMainLayoutStore} from "~/strores/UseMainLayoutStore";
import dayjs from "dayjs";
export const useDataStore = defineStore('DataStore', {
state: () => ({
data: <dataType>{},
}),
actions: {
setData(type: string, data: any) {
this.data[type] = data
},
},
})
export type dataType = {
[key: string]: string;
};