瀏覽代碼

fix:修改动态表单弹窗增加是否编辑状态

zcuishan 4 月之前
父節點
當前提交
a2002d3762
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      src/views/form/template/components/FormModal.vue

+ 8 - 1
src/views/form/template/components/FormModal.vue

@@ -5,11 +5,17 @@
     @register="registerModal"
     :title="getTitle"
     @ok="handleSubmit"
+    :is-update="state.isUpdate"
     @cancel="handleClose"
     :paddingRight="15"
     :bodyStyle="{ minHeight: '400px !important' }"
   >
-    <SimpleForm ref="formRef" :formProps="formProps" :formModel="state.formModel" />
+    <SimpleForm
+      ref="formRef"
+      :is-update="state.isUpdate"
+      :formProps="formProps"
+      :formModel="state.formModel"
+    />
   </BasicModal>
   <BasicDrawer
     v-else
@@ -167,6 +173,7 @@
   async function handleSubmit() {
     try {
       const values = await formRef.value?.validate();
+      console.log(values);
       //添加隐藏组件
       if (formProps.value.hiddenComponent?.length) {
         formProps.value.hiddenComponent.forEach((component) => {