diff --git a/packages/coupon-list/test/__snapshots__/index.spec.js.snap b/packages/coupon-list/test/__snapshots__/index.spec.js.snap index 3e51b5b49..76960c3e8 100644 --- a/packages/coupon-list/test/__snapshots__/index.spec.js.snap +++ b/packages/coupon-list/test/__snapshots__/index.spec.js.snap @@ -117,7 +117,7 @@ exports[`render coupon list 1`] = ` - @@ -159,7 +159,7 @@ exports[`render empty coupon list 1`] = `
-
- diff --git a/packages/tab/index.js b/packages/tab/index.js index 3898e9a55..9d4a9db20 100644 --- a/packages/tab/index.js +++ b/packages/tab/index.js @@ -41,20 +41,20 @@ export default sfc({ }, render(h) { - const { slots } = this; + const { slots, selected } = this; const shouldRender = this.inited || !this.parent.lazyRender; + const Content = [shouldRender ? slots() : h()]; - const Content = [ - shouldRender ? slots() : h(), - slots('title') &&
{slots('title')}
- ]; + if (slots('title')) { + Content.push(
{slots('title')}
); + } if (this.parent.animated) { return (
{Content}
@@ -62,12 +62,7 @@ export default sfc({ } return ( -
+
{Content}
); diff --git a/packages/tab/test/__snapshots__/demo.spec.js.snap b/packages/tab/test/__snapshots__/demo.spec.js.snap index 2d32c3e59..597991c82 100644 --- a/packages/tab/test/__snapshots__/demo.spec.js.snap +++ b/packages/tab/test/__snapshots__/demo.spec.js.snap @@ -14,16 +14,16 @@ exports[`renders demo correctly 1`] = `
-