File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
src/uni_modules/wot-design-uni/components/wd-datetime-picker Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 1919 <view class =" wd-picker__body" >
2020 <view class =" wd-picker__value-wraper" >
2121 <view :class =" `wd-picker__value ${customValueClass}`" >
22- <view v-if =" region" >
23- <text :class =" (showValue as string[])[0] ? '' : 'wd-picker__placeholder'" >
24- {{ (showValue as string[])[0] ? (showValue as string[])[0] : placeholder }}
25- </text >
26- {{ translate('to') }}
27- <text :class =" (showValue as string[])[1] ? '' : 'wd-picker__placeholder'" >
28- {{ (showValue as string[])[1] ? (showValue as string[])[1] : placeholder }}
29- </text >
30- </view >
22+ <template v-if =" region " >
23+ <view v-if =" isArray(showValue) && showValue.length === 2 && showValue[0] !== '' && showValue[1] !== ''" >
24+ <text :class =" showValue[0] ? '' : 'wd-picker__placeholder'" >
25+ {{ showValue[0] ? showValue[0] : placeholder }}
26+ </text >
27+ {{ translate('to') }}
28+ <text :class =" showValue[1] ? '' : 'wd-picker__placeholder'" >
29+ {{ showValue[1] ? showValue[1] : placeholder }}
30+ </text >
31+ </view >
32+ <view v-else class =" wd-picker__placeholder" >
33+ {{ placeholder || translate('placeholder') }}
34+ </view >
35+ </template >
3136 <view v-else :class =" showValue ? '' : 'wd-picker__placeholder'" >
3237 {{ showValue ? showValue : placeholder || translate('placeholder') }}
3338 </view >
You can’t perform that action at this time.
0 commit comments