catch.ts
360 Bytes
const useCatchStore = defineStore(
// 唯一ID
'catch',
() => {
const catchMap = {}
const setCatch = (field, val: any = '') => {
catchMap[field] = val
}
const getCatch = (field) => {
return catchMap[field]
}
return {
catchMap,
setCatch,
getCatch
}
},
)
export default useCatchStore