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

pull/2860/head^2
John60676 2020-09-18 22:52:17 +08:00 committed by GitHub
parent be480a89c0
commit 675dff92c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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,