mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[new feature] Tabs: add lazy-render props (#2800)
This commit is contained in:
@@ -58,9 +58,11 @@ export default sfc({
|
||||
|
||||
render(h) {
|
||||
const { slots } = this;
|
||||
const shouldRender = this.inited || !this.parent.lazyRender;
|
||||
|
||||
return (
|
||||
<div vShow={this.selected || this.parent.animated} class={bem('pane')}>
|
||||
{this.inited ? slots() : h()}
|
||||
{shouldRender ? slots() : h()}
|
||||
{slots('title') && <div ref="title">{slots('title')}</div>}
|
||||
</div>
|
||||
);
|
||||
|
Reference in New Issue
Block a user