Browse Source

fix(vc-tabs): tabs vue warning (#2865)

pull/2860/head^2
John60676 4 years ago committed by GitHub
parent
commit
675dff92c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      components/vc-tabs/src/TabPane.jsx

6
components/vc-tabs/src/TabPane.jsx

@ -17,7 +17,7 @@ export default {
},
setup() {
return {
_isActived: undefined,
isActived: undefined,
sentinelContext: inject('sentinelContext', {}),
};
},
@ -25,14 +25,14 @@ export default {
const { destroyInactiveTabPane, active, forceRender, rootPrefixCls } = this.$props;
const children = getSlot(this);
const placeholder = getComponent(this, 'placeholder');
this._isActived = this._isActived || active;
this.isActived = this.isActived || active;
const prefixCls = `${rootPrefixCls}-tabpane`;
const cls = {
[prefixCls]: 1,
[`${prefixCls}-inactive`]: !active,
[`${prefixCls}-active`]: active,
};
const isRender = destroyInactiveTabPane ? active : this._isActived;
const isRender = destroyInactiveTabPane ? active : this.isActived;
const shouldRender = isRender || forceRender;
const {
sentinelStart,

Loading…
Cancel
Save