store.ts 378 B

123456789101112131415161718192021
  1. import { reactive } from 'vue'
  2. const initialState = {
  3. step: 0,
  4. repairId: '',
  5. rightId: '',
  6. shop: null as any,
  7. periods: [] as any[],
  8. uiDate: '',
  9. uiPeriod: '',
  10. date: '',
  11. period: '',
  12. phoneNumber: '',
  13. remark: '',
  14. detail: null as any,
  15. }
  16. export const state = reactive({ ...initialState })
  17. export function resetState() {
  18. Object.assign(state, initialState)
  19. }