<template>
  <storeForm :showStatus="showStatus" :form="form" title="修改门店" @submit="submit" @close="close" />
</template>

<script>
import storeForm from './form'
import { updateStore } from 'api/store'
export default {
  props: {
    showStatus: Boolean,
    form: {
      type: Object,
      default () {
        return {
          name: 1
        }
      }
    }
  },
  data () {
    return {
    }
  },
  components: {
    storeForm
  },
  watch: {

  },
  methods: {
    submit () {
      updateStore(this.form).then(res => {
        this.$emit('editStoreSuccess')
      })
    },
    close () {
      this.$emit('close')
    }
  }
}
</script>