1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

reolve the activate focus primary field (#417)

This commit is contained in:
elsiosanchez 2020-03-24 21:40:02 -04:00 committed by GitHub
parent 8c9e2f0513
commit e6fd209d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -329,7 +329,7 @@ export default {
methods: {
showMessage,
focusField() {
if (this.isDisplayed && this.isMandatory && !this.isReadOnly) {
if (this.isDisplayed && !this.isReadOnly) {
this.$refs[this.field.columnName].activeFocus()
}
}

View File

@ -680,7 +680,7 @@ export default {
return new Promise(resolve => {
const fieldFocus = this.getterFieldList.find(itemField => {
if (this.$refs.hasOwnProperty(itemField.columnName)) {
if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable) {
if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable && itemField.componentPath !== 'FieldSelect') {
return true
}
}