chore: optimize code (#13214)

pull/13232/head
hetech 2018-10-30 15:31:58 +08:00 committed by GitHub
parent 168bf64b57
commit 87f448f8dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@
return this.disabled || this._radioGroup.disabled || (this.elForm || {}).disabled; return this.disabled || this._radioGroup.disabled || (this.elForm || {}).disabled;
}, },
tabIndex() { tabIndex() {
return !this.isDisabled ? (this._radioGroup ? (this.value === this.label ? 0 : -1) : 0) : -1; return (this.isDisabled || (this._radioGroup && this.value !== this.label)) ? -1 : 0;
} }
}, },

View File

@ -115,7 +115,7 @@
: this.disabled || (this.elForm || {}).disabled; : this.disabled || (this.elForm || {}).disabled;
}, },
tabIndex() { tabIndex() {
return !this.isDisabled ? (this.isGroup ? (this.model === this.label ? 0 : -1) : 0) : -1; return (this.isDisabled || (this.isGroup && this.model !== this.label)) ? -1 : 0;
} }
}, },