form.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <Modal v-model="showStatus" width="350" footer-hide>
  3. <div slot="close">
  4. <Icon custom="iconfont iconform_close" @click="close" />
  5. </div>
  6. <div slot="header" class="modal-header">{{ title }}</div>
  7. <template>
  8. <Form :label-width="75">
  9. <FormItem label="门店名称">
  10. <Input size="large" v-model="form.name" class="form-input" maxlength="8" />
  11. </FormItem>
  12. <FormItem label="门店地址">
  13. <Input size="large" v-model="form.address" class="form-input" />
  14. </FormItem>
  15. <FormItem label="门店状态">
  16. <Select v-model="form.status" class="form-input" size="large">
  17. <Option :value="1">启用</Option>
  18. <Option :value="0">停用</Option>
  19. </Select>
  20. </FormItem>
  21. <!-- <FormItem label="创建时间">
  22. <Input size="large" v-model="form.createTime" class="form-input" />
  23. </FormItem> -->
  24. </Form>
  25. <div class="btn-w">
  26. <Button type="primary" @click="submit">确定</Button>
  27. </div>
  28. </template>
  29. </Modal>
  30. </template>
  31. <script>
  32. export default {
  33. props: {
  34. form: Object,
  35. title: String,
  36. showStatus: Boolean
  37. },
  38. methods: {
  39. submit () {
  40. this.$emit('submit')
  41. },
  42. close () {
  43. this.$emit('close')
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="less" scoped>
  49. .modal-header {
  50. line-height: 50px;
  51. padding-left: 20px;
  52. font-size: 16px;
  53. }
  54. .form-input {
  55. width: 240px;
  56. }
  57. </style>