Skip to content

Commit

Permalink
fix: disabled tabPane can be actived vueComponent#3575
Browse files Browse the repository at this point in the history
  • Loading branch information
zkwolf committed Jan 27, 2021
1 parent e179ded commit 2ac1801
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/vc-tabs/src/Tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BaseMixin from '../../_util/BaseMixin';
import PropTypes from '../../_util/vue-types';
import raf from 'raf';
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 Sentinel from './Sentinel';
import isValid from '../../_util/isValid';
Expand Down Expand Up @@ -154,7 +154,8 @@ export default {
const activeKey = this.$data._activeKey;
const children = [];
this.$props.children.forEach(c => {
if (c && !c.disabled && c.disabled !== '') {
const disabled = getValueByProp(c, 'disabled');
if (c && !disabled && disabled !== '') {
if (next) {
children.push(c);
} else {
Expand Down

0 comments on commit 2ac1801

Please sign in to comment.