fix(vc-tabs): tabs vue warning (#2865)
parent
be480a89c0
commit
675dff92c1
|
@ -17,7 +17,7 @@ export default {
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
return {
|
return {
|
||||||
_isActived: undefined,
|
isActived: undefined,
|
||||||
sentinelContext: inject('sentinelContext', {}),
|
sentinelContext: inject('sentinelContext', {}),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -25,14 +25,14 @@ export default {
|
||||||
const { destroyInactiveTabPane, active, forceRender, rootPrefixCls } = this.$props;
|
const { destroyInactiveTabPane, active, forceRender, rootPrefixCls } = this.$props;
|
||||||
const children = getSlot(this);
|
const children = getSlot(this);
|
||||||
const placeholder = getComponent(this, 'placeholder');
|
const placeholder = getComponent(this, 'placeholder');
|
||||||
this._isActived = this._isActived || active;
|
this.isActived = this.isActived || active;
|
||||||
const prefixCls = `${rootPrefixCls}-tabpane`;
|
const prefixCls = `${rootPrefixCls}-tabpane`;
|
||||||
const cls = {
|
const cls = {
|
||||||
[prefixCls]: 1,
|
[prefixCls]: 1,
|
||||||
[`${prefixCls}-inactive`]: !active,
|
[`${prefixCls}-inactive`]: !active,
|
||||||
[`${prefixCls}-active`]: active,
|
[`${prefixCls}-active`]: active,
|
||||||
};
|
};
|
||||||
const isRender = destroyInactiveTabPane ? active : this._isActived;
|
const isRender = destroyInactiveTabPane ? active : this.isActived;
|
||||||
const shouldRender = isRender || forceRender;
|
const shouldRender = isRender || forceRender;
|
||||||
const {
|
const {
|
||||||
sentinelStart,
|
sentinelStart,
|
||||||
|
|
Loading…
Reference in New Issue