Browse Source

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

zcuishan 4 months ago
parent
commit
a2002d3762
1 changed files with 8 additions and 1 deletions
  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) => {