fix: disabled tabPane can be actived #3575 (#3604)

pull/3616/head
zkwolf 2021-01-27 23:16:47 +08:00 committed by GitHub
parent e179dedb4a
commit 96e5e836b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import BaseMixin from '../../_util/BaseMixin';
import PropTypes from '../../_util/vue-types'; import PropTypes from '../../_util/vue-types';
import raf from 'raf'; import raf from 'raf';
import KeyCode from './KeyCode'; import KeyCode from './KeyCode';
import { getOptionProps, getListeners } from '../../_util/props-util'; import { getOptionProps, getListeners, getValueByProp } from '../../_util/props-util';
import { cloneElement } from '../../_util/vnode'; import { cloneElement } from '../../_util/vnode';
import Sentinel from './Sentinel'; import Sentinel from './Sentinel';
import isValid from '../../_util/isValid'; import isValid from '../../_util/isValid';
@ -154,7 +154,8 @@ export default {
const activeKey = this.$data._activeKey; const activeKey = this.$data._activeKey;
const children = []; const children = [];
this.$props.children.forEach(c => { this.$props.children.forEach(c => {
if (c && !c.disabled && c.disabled !== '') { const disabled = getValueByProp(c, 'disabled');
if (c && !disabled && disabled !== '') {
if (next) { if (next) {
children.push(c); children.push(c);
} else { } else {