import { reactive } from 'vue'
import { addressType } from '../cart/cart'

const original = () => {
  return {
    id: 0,
    defaultStatus: 1,
    province: '',
    city: '',
    memberId: null as any,
    postCode: '',
    region: '',
    name: '',
    phoneNumber: '',
    detailAddress: ''
  } as addressType
}

export const addressInfo = reactive(original())

// 重置对象
export const resestState = () => {
  Object.assign(addressInfo, original())
}
