import { formInit } from '../const'

export const DetailMixins = {
  data() {
    return {
      form: {},
      formFunc: null,
      isOpenSelect:[{
        key: 0,
        label: "未开通"
      },
      {
        key: 1,
        label: "已开通"
      }]
    }
  },
  watch: {
    type: {
      immediate: true,
      handler(newV) {
        this.formFunc = formInit(newV)
      },
    },
    curInfo: {
      immediate: true,
      handler(newV) {
        this.form = this.formFunc(newV)
      },
    },
  },
  props: {
    curInfo: {
      type: Object,
      default: () => {},
    },
    type: {
      type: Number,
      defualt: null,
    },
  },
  methods: {
  },
}
