<template>
  <div class="app-container home">
    <Form v-if="!merchantId || shopState === '002'" ref="form" v-model="form">
      <Input label="1" prop="prop1" required/>
      <InputNumber label="2" prop="prop2" required/>
      <DatePicker label="3" prop="prop3" required/>
      <Select label="4" prop="prop4" :data="[{dictLabel: 'test', dictValue: '32'}]" required/>
      <Form v-model="form.sub">
        <Input label="1" prop="prop1" required/>
      </Form>
    </Form>
    <MerchantForm v-else :merchantId="merchantId"/>
  </div>
</template>

<script>
import MerchantForm from '@/views/merchant/info/components/MerchantForm'
import { mapGetters } from 'vuex'

export default {
  name: "Index",
  components: {MerchantForm},
  data(){
    return {
      form: {
        sub: {}
      }
    }
  },
  computed: {
    ...mapGetters(['merchantId', 'shopState']),
  }
}
</script>