feat(web): 增加表单数据校验

This commit is contained in:
v-zhangjc9
2025-07-11 11:07:50 +08:00
parent 863638deaa
commit ac2b6b1611
10 changed files with 131 additions and 58 deletions

View File

@@ -1,6 +1,6 @@
import {create} from 'zustand/react'
export type DataStoreState = {
export const useDataStore = create<{
data: Record<string, any>,
getData: () => Record<string, any>,
setData: (data: Record<string, any>) => void,
@@ -8,9 +8,7 @@ export type DataStoreState = {
setDataById: (id: string, data: any) => void,
mergeDataById: (id: string, data: any) => void,
removeDataById: (id: string) => void,
}
export const useDataStore = create<DataStoreState>((set, get) => ({
}>((set, get) => ({
data: {},
getData: () => get().data,
setData: (data) => set({