|
35 | 35 | <picker-view v-else :value="valueArr" @change="change" class="u-picker-view">
|
36 | 36 | <picker-view-column v-if="!reset && params.year">
|
37 | 37 | <view class="u-column-item" v-for="(item,index) in years" :key="index">
|
38 |
| - {{ item }}<text class="u-text">年</text> |
| 38 | + {{ item }}<text class="u-text" v-if="showTimeTag">年</text> |
39 | 39 | </view>
|
40 | 40 | </picker-view-column>
|
41 | 41 | <picker-view-column v-if="!reset && params.month">
|
42 | 42 | <view class="u-column-item" v-for="(item,index) in months" :key="index">
|
43 |
| - {{ formatNumber(item)}}<text class="u-text">月</text> |
| 43 | + {{ formatNumber(item)}}<text class="u-text" v-if="showTimeTag">月</text> |
44 | 44 | </view>
|
45 | 45 | </picker-view-column>
|
46 | 46 | <picker-view-column v-if="!reset && params.day">
|
47 | 47 | <view class="u-column-item" v-for="(item,index) in days" :key="index">
|
48 |
| - {{ formatNumber(item) }}<text class="u-text">日</text> |
| 48 | + {{ formatNumber(item) }}<text class="u-text" v-if="showTimeTag">日</text> |
49 | 49 | </view>
|
50 | 50 | </picker-view-column>
|
51 | 51 | <picker-view-column v-if="!reset && params.hour">
|
52 | 52 | <view class="u-column-item" v-for="(item,index) in hours" :key="index">
|
53 |
| - {{ formatNumber(item) }}<text class="u-text">时</text> |
| 53 | + {{ formatNumber(item) }}<text class="u-text" v-if="showTimeTag">时</text> |
54 | 54 | </view>
|
55 | 55 | </picker-view-column>
|
56 | 56 | <picker-view-column v-if="!reset && params.minute">
|
57 | 57 | <view class="u-column-item" v-for="(item,index) in minutes" :key="index">
|
58 |
| - {{ formatNumber(item) }}<text class="u-text">分</text> |
| 58 | + {{ formatNumber(item) }}<text class="u-text" v-if="showTimeTag">分</text> |
59 | 59 | </view>
|
60 | 60 | </picker-view-column>
|
61 | 61 | <picker-view-column v-if="!reset && params.second">
|
62 | 62 | <view class="u-column-item" v-for="(item,index) in seconds" :key="index">
|
63 |
| - {{ formatNumber(item) }}<text class="u-text">秒</text> |
| 63 | + {{ formatNumber(item) }}<text class="u-text" v-if="showTimeTag">秒</text> |
64 | 64 | </view>
|
65 | 65 | </picker-view-column>
|
66 | 66 | </picker-view>
|
|
83 | 83 | * @property {String Number} start-year 可选的开始年份,mode=time时有效(默认1950)
|
84 | 84 | * @property {String Number} end-year 可选的结束年份,mode=time时有效(默认2050)
|
85 | 85 | * @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
|
| 86 | + * @property {Boolean} show-time-tag 时间模式时,是否显示后面的年月日中文提示 |
86 | 87 | * @property {String} cancel-color 取消按钮的颜色(默认#606266)
|
87 | 88 | * @property {String} confirm-color 确认按钮的颜色(默认#2979ff)
|
88 | 89 | * @property {String} default-time 默认选中的时间,mode=time时有效
|
|
151 | 152 | return [];
|
152 | 153 | }
|
153 | 154 | },
|
| 155 | + // 时间模式时,是否显示后面的年月日中文提示 |
| 156 | + showTimeTag: { |
| 157 | + type: Boolean, |
| 158 | + default: true |
| 159 | + }, |
154 | 160 | // 默认显示地区的编码,defaultRegion和areaCode同时存在,areaCode优先,可传类似["13", "1303", "130304"]
|
155 | 161 | areaCode: {
|
156 | 162 | type: Array,
|
|
0 commit comments