diff --git a/src/address-edit/Detail.js b/src/address-edit/Detail.js index 570382794..8d8485682 100644 --- a/src/address-edit/Detail.js +++ b/src/address-edit/Detail.js @@ -30,7 +30,7 @@ export default createComponent({ this.$refs.field.blur(); }, - renderFinish() { + genFinish() { const show = this.value && this.focused && android; if (show) { return ( @@ -41,7 +41,7 @@ export default createComponent({ } }, - renderSearchResult() { + genSearchResult() { const { searchResult } = this; const show = this.focused && searchResult && this.showSearchResult; if (show) { @@ -75,10 +75,10 @@ export default createComponent({ label={t('label')} maxlength={this.detailMaxlength} placeholder={t('placeholder')} - scopedSlots={{ icon: this.renderFinish }} + scopedSlots={{ icon: this.genFinish }} {...{ on: this.$listeners }} /> - {this.renderSearchResult()} + {this.genSearchResult()} ); } diff --git a/src/address-list/Item.tsx b/src/address-list/Item.tsx index d9426dab4..c5792e6c6 100644 --- a/src/address-list/Item.tsx +++ b/src/address-list/Item.tsx @@ -45,7 +45,7 @@ function AddressItem( emit(ctx, 'click'); } - const renderRightIcon = () => ( + const genRightIcon = () => ( ); - const renderContent = () => { + const genContent = () => { const { data } = props; const Info = [
{`${data.name},${data.tel}`}
, @@ -79,8 +79,8 @@ function AddressItem( valueClass={bem('value')} clickable={switchable && !disabled} scopedSlots={{ - default: renderContent, - 'right-icon': renderRightIcon + default: genContent, + 'right-icon': genRightIcon }} onClick={onClick} {...inherit(ctx)} diff --git a/src/address-list/index.tsx b/src/address-list/index.tsx index d14f99cf6..5217ac5d2 100644 --- a/src/address-list/index.tsx +++ b/src/address-list/index.tsx @@ -29,7 +29,7 @@ function AddressList( slots: AddressListSlots, ctx: RenderContext ) { - function renderList(list?: AddressItemData[], disabled?: boolean) { + function genList(list?: AddressItemData[], disabled?: boolean) { if (!list) { return; } @@ -57,8 +57,8 @@ function AddressList( )); } - const List = renderList(props.list); - const DisabledList = renderList(props.disabledList, true); + const List = genList(props.list); + const DisabledList = genList(props.disabledList, true); return (
diff --git a/src/coupon-list/index.js b/src/coupon-list/index.js index 7ca6cd2a1..138fe8d37 100644 --- a/src/coupon-list/index.js +++ b/src/coupon-list/index.js @@ -127,7 +127,7 @@ export default createComponent({ }); }, - renderEmpty() { + genEmpty() { return (
@@ -136,7 +136,7 @@ export default createComponent({ ); }, - renderExchangeButton() { + genExchangeButton() { return (
); @@ -198,7 +198,7 @@ export default createComponent({ {disabledCoupons.map(coupon => ( ))} - {!disabledCoupons.length && this.renderEmpty()} + {!disabledCoupons.length && this.genEmpty()}
); diff --git a/src/field/index.js b/src/field/index.js index dcfc3ef90..91e73d955 100644 --- a/src/field/index.js +++ b/src/field/index.js @@ -202,7 +202,7 @@ export default createComponent({ } }, - renderInput() { + genInput() { const inputSlot = this.slots('input'); if (inputSlot) { @@ -240,7 +240,7 @@ export default createComponent({ return ; }, - renderLeftIcon() { + genLeftIcon() { const showLeftIcon = this.slots('left-icon') || this.leftIcon; if (showLeftIcon) { return ( @@ -251,7 +251,7 @@ export default createComponent({ } }, - renderRightIcon() { + genRightIcon() { const { slots } = this; const showRightIcon = slots('right-icon') || this.rightIcon; if (showRightIcon) { @@ -263,7 +263,7 @@ export default createComponent({ } }, - renderWordLimit() { + genWordLimit() { if (this.showWordLimit && this.$attrs.maxlength) { return (
@@ -278,7 +278,7 @@ export default createComponent({ const { slots, labelAlign } = this; const scopedSlots = { - icon: this.renderLeftIcon + icon: this.genLeftIcon }; if (slots('label')) { scopedSlots.title = () => slots('label'); @@ -306,14 +306,14 @@ export default createComponent({ onClick={this.onClick} >
- {this.renderInput()} + {this.genInput()} {this.showClear && ( )} - {this.renderRightIcon()} + {this.genRightIcon()} {slots('button') &&
{slots('button')}
}
- {this.renderWordLimit()} + {this.genWordLimit()} {this.errorMessage && (
{this.errorMessage} diff --git a/src/image/index.js b/src/image/index.js index 2bf0c0d32..70dfa62b0 100644 --- a/src/image/index.js +++ b/src/image/index.js @@ -104,7 +104,7 @@ export default createComponent({ this.$emit('click', event); }, - renderPlaceholder() { + genPlaceholder() { if (this.loading && this.showLoading) { return (
@@ -122,7 +122,7 @@ export default createComponent({ } }, - renderImage() { + genImage() { const imgData = { class: bem('img'), attrs: { @@ -150,8 +150,8 @@ export default createComponent({ render() { return (
- {this.renderImage()} - {this.renderPlaceholder()} + {this.genImage()} + {this.genPlaceholder()}
); } diff --git a/src/rate/index.js b/src/rate/index.js index dd88912e7..3cfa29e0b 100644 --- a/src/rate/index.js +++ b/src/rate/index.js @@ -136,7 +136,7 @@ export default createComponent({ return this.allowHalf ? 0.5 : 1; }, - renderStar(status, index) { + genStar(status, index) { const { icon, color, count, voidIcon, disabled, voidColor, disabledColor } = this; const score = index + 1; const isFull = status === 'full'; @@ -196,7 +196,7 @@ export default createComponent({ onTouchstart={this.onTouchStart} onTouchmove={this.onTouchMove} > - {this.list.map((status, index) => this.renderStar(status, index))} + {this.list.map((status, index) => this.genStar(status, index))}
); } diff --git a/src/sku/components/SkuImgUploader.js b/src/sku/components/SkuImgUploader.js index d44aef55f..091066f48 100644 --- a/src/sku/components/SkuImgUploader.js +++ b/src/sku/components/SkuImgUploader.js @@ -44,7 +44,7 @@ export default createComponent({ this.$toast(t('oversize', this.maxSize)); }, - renderUploader(content, disabled = false) { + genUploader(content, disabled = false) { return ( {this.uploadFail @@ -80,7 +80,7 @@ export default createComponent({ render() { return (
- {this.value && this.renderUploader( + {this.value && this.genUploader( [ , , - this.renderMask() + this.genMask() ], !this.uploadFail )} - {!this.value && !this.paddingImg && this.renderUploader( + {!this.value && !this.paddingImg && this.genUploader(
diff --git a/src/swipe/index.js b/src/swipe/index.js index 422be52a7..ff5499fb8 100644 --- a/src/swipe/index.js +++ b/src/swipe/index.js @@ -312,7 +312,7 @@ export default createComponent({ } }, - renderIndicator() { + genIndicator() { const { count, activeIndicator } = this; const slot = this.slots('indicator'); @@ -349,7 +349,7 @@ export default createComponent({ > {this.slots()}
- {this.renderIndicator()} + {this.genIndicator()}
); } diff --git a/src/tabs/Content.js b/src/tabs/Content.js index 99bf1031e..82d20be57 100644 --- a/src/tabs/Content.js +++ b/src/tabs/Content.js @@ -53,7 +53,7 @@ export default createComponent({ } }, - renderChildren() { + genChildren() { if (this.animated) { return (
@@ -72,7 +72,7 @@ export default createComponent({ class={bem('content', { animated: this.animated })} {...{ on: this.listeners }} > - {this.renderChildren()} + {this.genChildren()}
); } diff --git a/src/uploader/index.js b/src/uploader/index.js index 92a9721e8..0cc40e450 100644 --- a/src/uploader/index.js +++ b/src/uploader/index.js @@ -213,7 +213,7 @@ export default createComponent({ } }, - renderPreviewItem(item, index) { + genPreviewItem(item, index) { const DeleteIcon = ( = this.maxCount) { return; } @@ -322,8 +322,8 @@ export default createComponent({ return (
- {this.renderPreviewList()} - {this.renderUpload()} + {this.genPreviewList()} + {this.genUpload()}
);