bug: Fix bug in form reset

This commit is contained in:
QM303176530
2020-04-05 20:57:11 +08:00
parent 81a54b5a44
commit 63fe673169
4 changed files with 4 additions and 27 deletions

View File

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

View File

@@ -136,9 +136,7 @@ export default {
}, },
// 初始化表单 // 初始化表单
initForm() { initForm() {
for (const key in this.form) { this.$refs.authorityForm.resetFields()
this.form[key] = ''
}
}, },
// 关闭窗口 // 关闭窗口
closeDialog() { closeDialog() {

View File

@@ -162,17 +162,7 @@ export default {
}, },
// 初始化弹窗内表格方法 // 初始化弹窗内表格方法
initForm() { initForm() {
this.form = { this.$refs.menuForm.resetFields()
path: '',
name: '',
hidden: '',
parentId: '',
component: '',
meta: {
title: '',
icon: ''
}
}
}, },
// 关闭弹窗 // 关闭弹窗
closeDialog() { closeDialog() {

View File

@@ -141,13 +141,7 @@ export default {
}) })
}, },
closeAddUserDialog() { closeAddUserDialog() {
this.userInfo = { this.$refs.userForm.resetFields()
username: '',
password: '',
nickName: '',
headerImg: '',
authorityId: ''
}
this.addUserDialog = false this.addUserDialog = false
}, },
handleAvatarSuccess(res) { handleAvatarSuccess(res) {