form.ts 509 B

1234567891011121314151617181920212223
  1. import { formState } from '~/types/interfaces'
  2. export const state = () => ({
  3. dirty: false,
  4. showConfirmToLeave: false,
  5. goAfterLeave: null
  6. })
  7. export const mutations = {
  8. setDirty (state:formState, dirty:boolean) {
  9. state.dirty = dirty
  10. },
  11. setShowConfirmToLeave (state:formState, showConfirmToLeave:boolean) {
  12. state.showConfirmToLeave = showConfirmToLeave
  13. },
  14. setGoAfterLeave (state:formState, goAfterLeave:string) {
  15. state.goAfterLeave = goAfterLeave
  16. }
  17. }
  18. export const actions = {
  19. }