form表单重置bug修复

This commit is contained in:
pixel
2020-04-16 09:48:18 +08:00
parent 57167b6c38
commit 5698c207a1
3 changed files with 25 additions and 1 deletions
+5 -1
View File
@@ -121,6 +121,10 @@ export default {
}, },
closeDialog(){ closeDialog(){
this.dialogFormVisible = false this.dialogFormVisible = false
this.form = {
customerName:"",
customerPhoneData:""
}
}, },
async deleteCustomer(row){ async deleteCustomer(row){
this.visible = false this.visible = false
@@ -149,7 +153,7 @@ export default {
} }
if(res.code == 0){ if(res.code == 0){
this.dialogFormVisible = false this.closeDialog()
this.getTableData() this.getTableData()
} }
}, },
+6
View File
@@ -181,6 +181,12 @@ export default {
}, },
initForm() { initForm() {
this.$refs.apiForm.resetFields() this.$refs.apiForm.resetFields()
this.form= {
path: '',
apiGroup: '',
method: '',
description: ''
}
}, },
closeDialog() { closeDialog() {
this.initForm() this.initForm()
+14
View File
@@ -191,6 +191,20 @@ export default {
// 初始化弹窗内表格方法 // 初始化弹窗内表格方法
initForm() { initForm() {
this.$refs.menuForm.resetFields() this.$refs.menuForm.resetFields()
this.form = {
ID: 0,
path: '',
name: '',
hidden: '',
parentId: '',
component: '',
meta: {
title: '',
icon: '',
defaultMenu:false,
keepAlive:""
}
}
}, },
// 关闭弹窗 // 关闭弹窗
closeDialog() { closeDialog() {