mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
feat(Tab): add scrollspy prop (#5273)
This commit is contained in:
@@ -46,7 +46,8 @@ export default createComponent({
|
||||
|
||||
render(h) {
|
||||
const { slots, isActive } = this;
|
||||
const shouldRender = this.inited || !this.parent.lazyRender;
|
||||
const shouldRender = this.inited || this.parent.scrollspy || !this.parent.lazyRender;
|
||||
const show = this.parent.scrollspy || isActive;
|
||||
const Content = shouldRender ? slots() : h();
|
||||
|
||||
if (this.parent.animated) {
|
||||
@@ -62,7 +63,7 @@ export default createComponent({
|
||||
}
|
||||
|
||||
return (
|
||||
<div vShow={isActive} role="tabpanel" class={bem('pane')}>
|
||||
<div vShow={show} role="tabpanel" class={bem('pane')}>
|
||||
{Content}
|
||||
</div>
|
||||
);
|
||||
|
Reference in New Issue
Block a user