refactor: restructure pinia stores, fix calendar, add utilities
- Restructure Pinia store organization from src/stores/ to src/store/ with modular stores - Update main.ts to use locally created Pinia instance instead of imported pre-configured one - Fix template syntax errors in Calendar component: correct missing class spacing and incorrect closing tags - Remove unused calendar demo/example files and documentation - Add new constant files, token management utilities, and client configuration constants - Add custom hooks useGoHome and useGoLogin for navigation and login logic
This commit is contained in:
17
src/store/modules/picture.ts
Normal file
17
src/store/modules/picture.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
export const usePictureStore = defineStore("picture", {
|
||||
state() {
|
||||
return {
|
||||
previewImageData: [], // 预览图片数据
|
||||
};
|
||||
},
|
||||
|
||||
actions: {
|
||||
setPreviewImageData(data) {
|
||||
this.previewImageData = data;
|
||||
},
|
||||
},
|
||||
|
||||
unistorage: true,
|
||||
});
|
||||
Reference in New Issue
Block a user