Skip to content

Commit 0bcc3c4

Browse files
authored
fix: 🐛 修复loadmore组件属性errorText存在默认值导致国际化失效的问题 (#594)
1 parent 5cce125 commit 0bcc3c4

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/uni_modules/wot-design-uni/components/wd-loadmore/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ export const loadmoreProps = {
2020
/**
2121
* 加载失败的提示文案
2222
*/
23-
errorText: makeStringProp('加载失败,点击重试')
23+
errorText: String
2424
}

src/uni_modules/wot-design-uni/components/wd-loadmore/wd-loadmore.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
<view :class="['wd-loadmore', customClass]" :style="customStyle" @click="reload">
33
<wd-divider v-if="state === 'finished'">{{ finishedText || translate('finished') }}</wd-divider>
44
<block v-if="state === 'error'">
5-
<block v-if="errorText">
6-
{{ errorText }}
7-
</block>
8-
<block v-else>
9-
<text class="wd-loadmore__text">{{ translate('error') }}</text>
10-
<text class="wd-loadmore__text is-light">{{ translate('retry') }}</text>
11-
<wd-icon name="refresh" custom-class="wd-loadmore__refresh" />
12-
</block>
5+
<text class="wd-loadmore__text">{{ errorText || translate('error') }} </text>
6+
<text class="wd-loadmore__text is-light">{{ translate('retry') }}</text>
7+
<wd-icon name="refresh" custom-class="wd-loadmore__refresh" />
138
</block>
149
<block v-if="state === 'loading'">
1510
<wd-loading custom-class="wd-loadmore__loading" />

0 commit comments

Comments
 (0)