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

focus only on fields that are type text and number (#374)

This commit is contained in:
elsiosanchez 2020-02-28 02:19:08 -04:00 committed by GitHub
parent 460f6b9ada
commit 48ca22482c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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