child

  <div>
    <a-modal v-model="visible" title="产品详情" @ok="handleOk">
      <a-form
        id="detail"
        v-model="form"
        :form="form"
        @submit="handleSubmit"
        ref="form"
      >
        <a-form-item label="姓名">
          <a-input v-model="child.name" />
        </a-form-item>
        <a-form-item label="选择框一" has-feedback>
          <a-select v-model="child.select1">
            <a-select-option value="1"> 是 </a-select-option>
            <a-select-option value="0"> 否 </a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="选择框二" has-feedback>
          <a-select v-model="child.select2">
            <a-select-option value="1"> 是 </a-select-option>
            <a-select-option value="0"> 否 </a-select-option>
          </a-select>
        </a-form-item>
      </a-form>
    </a-modal>
  </div>
</template>
<script>
export default {
  props:{
    record:{
      type:Object
    }
  },
  data() {
    return {
      visible:false,
      child:{},
    };
  },
  beforeCreate() {
    this.form = this.$form.createForm(this, { name: "normal_login" });

  },
  methods: {
    handleSubmit() {},
    handleOk(e) {
      console.log(e);
      this.visible = false;
      // 保存这条数据
      console.log(this.dataform);

      //查询整个表格
      this.$parent.fatherMethod();
    },
  },
};
</script>
posted @ 2022-01-13 00:24  不爱吃西红柿  阅读(173)  评论(0编辑  收藏  举报