From 2ac180156be537bd115cebc498aaf03fa8908a13 Mon Sep 17 00:00:00 2001 From: zkwolf Date: Wed, 27 Jan 2021 17:29:22 +0800 Subject: [PATCH] fix: disabled tabPane can be actived #3575 --- components/vc-tabs/src/Tabs.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/vc-tabs/src/Tabs.jsx b/components/vc-tabs/src/Tabs.jsx index e7b2e3b9fd..75107bbc17 100644 --- a/components/vc-tabs/src/Tabs.jsx +++ b/components/vc-tabs/src/Tabs.jsx @@ -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'; @@ -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 {