16 lines
260 B
TypeScript
16 lines
260 B
TypeScript
|
import { defineStore } from 'pinia';
|
||
|
|
||
|
export const useCommonStore = defineStore('common', {
|
||
|
state: () => {
|
||
|
return {
|
||
|
time: new Date()
|
||
|
};
|
||
|
},
|
||
|
getters: {},
|
||
|
actions: {
|
||
|
setTime() {
|
||
|
this.time = new Date();
|
||
|
}
|
||
|
}
|
||
|
});
|