[improvement] Use scoped-slots in Vue 2.6+ (#2688)

This commit is contained in:
neverland
2019-02-05 22:16:55 +08:00
committed by GitHub
parent 1ea92c023c
commit f768e75bfe
45 changed files with 125 additions and 117 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ export default sfc({
return (
<div class={[bem(), 'van-hairline']} onClick={this.onClick}>
<Icon class={[bem('icon'), this.iconClass]} info={this.info} name={this.icon} />
{this.$slots.default || this.text}
{this.slots() || this.text}
</div>
);
}