[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
+2 -2
View File
@@ -63,11 +63,11 @@ export default sfc({
leftIcon="search"
{...props}
>
{h('template', { slot: 'left-icon' }, this.$slots['left-icon'])}
{h('template', { slot: 'left-icon' }, this.slots('left-icon'))}
</Field>
{showAction && (
<div class={bem('action')}>
{this.$slots.action || <div onClick={this.onBack}>{t('cancel')}</div>}
{this.slots('action') || <div onClick={this.onBack}>{t('cancel')}</div>}
</div>
)}
</div>