Browse Source

form表单重置bug修复

pixel 4 years ago
parent
commit
a4b0802fb7

+ 5 - 1
web/src/view/example/customer/customer.vue

@@ -121,6 +121,10 @@ export default {
     },
     closeDialog(){
       this.dialogFormVisible = false
+      this.form = {
+        customerName:"",
+        customerPhoneData:""
+      }
     },
     async deleteCustomer(row){
       this.visible = false
@@ -149,7 +153,7 @@ export default {
       }
      
       if(res.code == 0){
-        this.dialogFormVisible = false
+        this.closeDialog()
         this.getTableData()
       }
     },

+ 6 - 0
web/src/view/superAdmin/api/api.vue

@@ -181,6 +181,12 @@ export default {
     },
     initForm() {
       this.$refs.apiForm.resetFields()
+      this.form= {
+        path: '',
+        apiGroup: '',
+        method: '',
+        description: ''
+      }
     },
     closeDialog() {
       this.initForm()

+ 14 - 0
web/src/view/superAdmin/menu/menu.vue

@@ -191,6 +191,20 @@ export default {
     // 初始化弹窗内表格方法
     initForm() {
       this.$refs.menuForm.resetFields()
+      this.form = {
+        ID: 0,
+        path: '',
+        name: '',
+        hidden: '',
+        parentId: '',
+        component: '',
+        meta: {
+          title: '',
+          icon: '',
+          defaultMenu:false,
+          keepAlive:""
+        }
+      }
     },
     // 关闭弹窗
     closeDialog() {