feat: 增加可以自定义默认值功能

This commit is contained in:
2026-08-30 21:44:37 +08:00
parent 196251dfc9
commit 5f497f82f8
15 changed files with 205 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
import { defineStore } from 'pinia'
import type { IProfile } from "@/type/profile";
import type {IDefaultRecordValue, IProfile} from "@/type/profile";
import type {IStats} from "@/type";
export const useProfileStore = defineStore('profile', {
@@ -8,16 +8,27 @@ export const useProfileStore = defineStore('profile', {
showStoragePopup: false,
showOverviewPopup: false,
showPlanPopup: false,
showDefaultRecordValuePopup: false,
profileForm: {
gender: '',
height: 0,
name: '',
} as IProfile,
defaultRecordValueForm: {
weightValue: 70,
sportDuration: 30,
bloodPressureSystolic: 120,
bloodPressureDiastolic: 70,
bloodPressureHeartRate: 80,
bloodSugarValue: 5.4,
temperatureValue: 36.5,
} as IDefaultRecordValue,
storageStats: [] as IStats[],
storageTotal: 0,
storageMax: 1000,
overviewList: [] as string[],
planList: [] as string[],
defaultList: [],
isRefresh: false,
}),
actions: {