diff --git a/vue/src/mixins/bizDocumentDialogMixin.js b/vue/src/mixins/bizDocumentDialogMixin.js index 1acd7e4..1d99f61 100644 --- a/vue/src/mixins/bizDocumentDialogMixin.js +++ b/vue/src/mixins/bizDocumentDialogMixin.js @@ -269,7 +269,7 @@ export default { resetObj(this.form) this.history = [] this.parentSubList && (this.parentSubList = []) - this.$nextTick(() => this.$refs.form.resetFields()) + this.$nextTick(() => this.$refs.form.clearValidate()) }, //附件操作 diff --git a/vue/src/views/system/category/components/Form.vue b/vue/src/views/system/category/components/Form.vue index 41dc281..6f7fb30 100644 --- a/vue/src/views/system/category/components/Form.vue +++ b/vue/src/views/system/category/components/Form.vue @@ -121,7 +121,7 @@ cancel() { this.type = 'none' this.clearForm() - this.$refs.form.resetFields() + this.$nextTick(() => this.$refs.form.clearValidate()) }, clearForm() { this.form.id = null diff --git a/vue/src/views/system/customer/EditDialog.vue b/vue/src/views/system/customer/EditDialog.vue index e8cc04f..a5350e9 100644 --- a/vue/src/views/system/customer/EditDialog.vue +++ b/vue/src/views/system/customer/EditDialog.vue @@ -130,7 +130,7 @@ clearForm() { resetObj(this.form) this.form.status = 1 - this.$refs.form.resetFields() + this.$nextTick(() => this.$refs.form.clearValidate()) }, cancel() { this.$emit('input', false) diff --git a/vue/src/views/system/department/components/EditDialog.vue b/vue/src/views/system/department/components/EditDialog.vue index 6861f99..6a00209 100644 --- a/vue/src/views/system/department/components/EditDialog.vue +++ b/vue/src/views/system/department/components/EditDialog.vue @@ -87,7 +87,6 @@ methods: { open() { this.$nextTick(() => { - this.$refs.form.resetFields() if (this.type === 'edit') { Object .keys(this.data) @@ -101,7 +100,7 @@ this.form.pid = null this.form.name = null this.form.status = 1 - this.$refs.form.resetFields() + this.$nextTick(() => this.$refs.form.clearValidate()) }, cancel() { this.$emit('input', false) diff --git a/vue/src/views/system/resource/EditDialog.vue b/vue/src/views/system/resource/EditDialog.vue index d087f0a..fe7cae2 100644 --- a/vue/src/views/system/resource/EditDialog.vue +++ b/vue/src/views/system/resource/EditDialog.vue @@ -58,14 +58,12 @@ }, methods: { open() { - this.$nextTick(() => { - this.$refs.form.resetFields() - mergeObj(this.form, this.data) - }) + this.$nextTick(() => mergeObj(this.form, this.data)) }, cancel() { this.$emit('input', false) resetObj(this.form) + this.$nextTick(() => this.$refs.form.clearValidate()) }, confirm() { if (this.loading) return diff --git a/vue/src/views/system/role/components/EditDialog.vue b/vue/src/views/system/role/components/EditDialog.vue index 051421b..5f23f99 100644 --- a/vue/src/views/system/role/components/EditDialog.vue +++ b/vue/src/views/system/role/components/EditDialog.vue @@ -105,7 +105,6 @@ }, open() { this.$nextTick(() => { - this.$refs.form.resetFields() if (this.type === 'edit') { mergeObj(this.form, this.data) this.$refs.tree.setCheckedKeys(this.form.resource_id) @@ -118,7 +117,7 @@ this.form.status = 1 this.form.resource_id = [] this.$refs.tree.setCheckedKeys([]) - this.$refs.form.resetFields() + this.$nextTick(() => this.$refs.form.clearValidate()) }, cancel() { this.$emit('input', false) diff --git a/vue/src/views/system/supplier/EditDialog.vue b/vue/src/views/system/supplier/EditDialog.vue index ac7d9bf..9802b52 100644 --- a/vue/src/views/system/supplier/EditDialog.vue +++ b/vue/src/views/system/supplier/EditDialog.vue @@ -129,7 +129,7 @@ clearForm() { resetObj(this.form) this.form.status = 1 - this.$refs.form.resetFields() + this.$nextTick(() => this.$refs.form.clearValidate()) }, cancel() { this.$emit('input', false) diff --git a/vue/src/views/system/user/components/EditDialog.vue b/vue/src/views/system/user/components/EditDialog.vue index 3b91c4e..20158fd 100644 --- a/vue/src/views/system/user/components/EditDialog.vue +++ b/vue/src/views/system/user/components/EditDialog.vue @@ -97,7 +97,6 @@ methods: { open() { this.$nextTick(() => { - this.$refs.form.resetFields() if (this.type === 'edit') { Object .keys(this.data) @@ -111,7 +110,7 @@ this.form.role = null this.form.role_name = null this.form.status = 1 - this.$refs.form.resetFields() + this.$nextTick(() => this.$refs.form.clearValidate()) }, cancel() { this.$emit('input', false) diff --git a/vue/src/views/userCenter/components/Account.vue b/vue/src/views/userCenter/components/Account.vue index 39164b4..20bdb64 100644 --- a/vue/src/views/userCenter/components/Account.vue +++ b/vue/src/views/userCenter/components/Account.vue @@ -49,7 +49,7 @@ clearForm() { this.form.old_pwd = null this.form.new_pwd = null - this.$refs.form.resetFields() + this.$nextTick(() => this.$refs.form.clearValidate()) }, submit() { if (this.loading) return