chore: use gen instead of render (#4922)

This commit is contained in:
neverland
2019-11-05 09:12:03 +08:00
committed by GitHub
parent 9c54a77845
commit 56e9b7afa0
11 changed files with 46 additions and 46 deletions
+5 -5
View File
@@ -127,7 +127,7 @@ export default createComponent({
});
},
renderEmpty() {
genEmpty() {
return (
<div class={bem('empty')}>
<img src={this.emptyImage} />
@@ -136,7 +136,7 @@ export default createComponent({
);
},
renderExchangeButton() {
genExchangeButton() {
return (
<Button
size="small"
@@ -167,7 +167,7 @@ export default createComponent({
placeholder={this.inputPlaceholder || t('placeholder')}
maxlength="20"
scopedSlots={{
button: this.renderExchangeButton
button: this.genExchangeButton
}}
/>
);
@@ -187,7 +187,7 @@ export default createComponent({
nativeOnClick={onChange(index)}
/>
))}
{!coupons.length && this.renderEmpty()}
{!coupons.length && this.genEmpty()}
</div>
</Tab>
);
@@ -198,7 +198,7 @@ export default createComponent({
{disabledCoupons.map(coupon => (
<Coupon disabled key={coupon.id} coupon={coupon} currency={this.currency} />
))}
{!disabledCoupons.length && this.renderEmpty()}
{!disabledCoupons.length && this.genEmpty()}
</div>
</Tab>
);