mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[improvement] Use scoped-slots in Vue 2.6+ (#2688)
This commit is contained in:
@@ -116,8 +116,8 @@ export default sfc({
|
||||
onClick={this.onClick}
|
||||
{...{ props: this.$props }}
|
||||
>
|
||||
{this.$slots.value}
|
||||
{CELL_SLOTS.map(slot => h('template', { slot }, this.$slots[slot]))}
|
||||
{this.slots('value')}
|
||||
{CELL_SLOTS.map(slot => h('template', { slot }, this.slots(slot)))}
|
||||
</Cell>
|
||||
);
|
||||
|
||||
@@ -129,7 +129,7 @@ export default sfc({
|
||||
onTransitionend={this.onTransitionEnd}
|
||||
>
|
||||
<div ref="content" class={bem('content')}>
|
||||
{this.$slots.default}
|
||||
{this.slots()}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Reference in New Issue
Block a user