Commit 88b32b4b by 李少勇

修改校验问题

parent b692c87d
...@@ -65,6 +65,7 @@ export default { ...@@ -65,6 +65,7 @@ export default {
loading.close(); loading.close();
return return
} }
loading.close();
const tab = this.showBackendErrors(errorRules) const tab = this.showBackendErrors(errorRules)
if (tab) { if (tab) {
// tab切换之后,需出发tab-click的事件 // tab切换之后,需出发tab-click的事件
...@@ -77,7 +78,6 @@ export default { ...@@ -77,7 +78,6 @@ export default {
message: "校核失败", message: "校核失败",
type: "error", type: "error",
}); });
loading.close();
return return
} }
} }
...@@ -89,12 +89,13 @@ export default { ...@@ -89,12 +89,13 @@ export default {
type: 'error', type: 'error',
}); });
this.$nextTick(() => { this.$nextTick(() => {
console.log('========', this.$refs['modelForm'])
let isError = document.querySelectorAll('.is-error') let isError = document.querySelectorAll('.is-error')
let fields = this.$refs['modelForm'].fields let fields = this.$refs['modelForm'].fields
fields.map((fieldItem) => { fields.map((fieldItem) => {
if (fieldItem.validateState === 'error') { if (fieldItem.validateState === 'error') {
let errorComponentName = fieldItem.$options.componentName let errorComponentName = fieldItem.$options.componentName
console.log('fieldItem===', fieldItem) // console.log('fieldItem===', fieldItem)
// 切换tab // 切换tab
if (errorComponentName === 'ElTabPane') { if (errorComponentName === 'ElTabPane') {
fieldItem.$parent.currentName = fieldItem.name fieldItem.$parent.currentName = fieldItem.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment