20 lines
410 B
TypeScript
20 lines
410 B
TypeScript
|
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;
|
||
|
};
|