Skip to content

Commit 8fbca94

Browse files
author
xuqingkai
committed
fix: 🐛 修复DatePicker占位符展示缺失的问题
1 parent a1e9530 commit 8fbca94

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/uni_modules/wot-design-uni/components/wd-datetime-picker/wd-datetime-picker.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
<view class="wd-picker__value-wraper">
2121
<view :class="`wd-picker__value ${customValueClass}`">
2222
<template v-if="region">
23-
<view v-if="isArray(showValue) && showValue.length === 2 && showValue[0] !== '' && showValue[1] !== ''">
23+
<view v-if="isArray(showValue)">
2424
<text :class="showValue[0] ? '' : 'wd-picker__placeholder'">
25-
{{ showValue[0] ? showValue[0] : placeholder }}
25+
{{ showValue[0] ? showValue[0] : placeholder || translate('placeholder') }}
2626
</text>
2727
{{ translate('to') }}
2828
<text :class="showValue[1] ? '' : 'wd-picker__placeholder'">
29-
{{ showValue[1] ? showValue[1] : placeholder }}
29+
{{ showValue[1] ? showValue[1] : placeholder || translate('placeholder') }}
3030
</text>
3131
</view>
3232
<view v-else class="wd-picker__placeholder">

0 commit comments

Comments
 (0)