child

2022/1/13 6:04:16

本文主要是介绍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>


这篇关于child的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程