@10yun/cv-mobile-ui 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui-cv/cv-badge/{uni-badge.vue → cv-badge.vue} +2 -2
- package/ui-cv/cv-calendar/calendar.js +762 -345
- package/ui-cv/cv-calendar/cv-calendar-item.vue +198 -0
- package/ui-cv/cv-calendar/cv-calendar.vue +508 -0
- package/ui-cv/cv-card/cv-card.vue +427 -0
- package/ui-cv/cv-col/cv-col.vue +2965 -0
- package/ui-cv/cv-collapse/cv-collapse.vue +146 -0
- package/ui-cv/cv-collapse-item/cv-collapse-item.vue +395 -0
- package/ui-cv/cv-combox/cv-combox.vue +250 -0
- package/ui-cv/cv-countdown/cv-countdown.vue +245 -0
- package/ui-cv/cv-data-checkbox/cv-data-checkbox.vue +841 -0
- package/ui-cv/cv-data-indexed-list/cv-data-indexed-list-item.vue +154 -0
- package/ui-cv/cv-data-indexed-list/cv-data-indexed-list.vue +376 -0
- package/ui-cv/cv-data-picker/cv-data-picker.vue +486 -0
- package/ui-cv/cv-data-pickerview/{uni-data-picker.js → cv-data-picker.js} +0 -0
- package/ui-cv/cv-data-pickerview/cv-data-pickerview.vue +304 -0
- package/ui-cv/cv-dateformat/cv-dateformat.vue +86 -0
- package/ui-cv/cv-datetime-picker/calendar.vue +752 -738
- package/ui-cv/cv-datetime-picker/cv-datetime-picker.vue +958 -0
- package/ui-cv/cv-datetime-picker/time-picker.vue +900 -892
- package/ui-cv/cv-easyinput/cv-easyinput.vue +514 -0
- package/ui-cv/cv-fab/cv-fab.vue +465 -0
- package/ui-cv/cv-fab/{uni-fab.vue.bak → cv-fab.vue.bak} +2 -2
- package/ui-cv/cv-fav/cv-fav.vue +150 -0
- package/ui-cv/cv-file-picker/cv-file-picker.vue +619 -0
- package/ui-cv/cv-form-item/cv-form-item.vue +1 -1
- package/ui-cv/cv-goods-nav/{uni-goods-nav.vue → cv-goods-nav.vue} +1 -1
- package/ui-cv/{cv-icons2/cv-icons2.vue → cv-icon2/cv-icon2.vue} +3 -3
- package/ui-cv/{cv-icons2 → cv-icon2}/icons.js +0 -0
- package/ui-cv/{cv-icons2 → cv-icon2}/uni.ttf +0 -0
- package/ui-cv/cv-indexed-list/cv-indexed-list-item.vue +154 -0
- package/ui-cv/cv-indexed-list/cv-indexed-list.vue +371 -0
- package/ui-cv/cv-input-password/cv-input-password.vue +2 -2
- package/ui-cv/{cv-link/uni-link.vue → cv-link2/cv-link2.vue} +1 -1
- package/ui-cv/cv-list/cv-list.vue +107 -0
- package/ui-cv/cv-list/cv-refresh.vue +65 -0
- package/ui-cv/cv-list-ad/cv-list-ad.vue +113 -0
- package/ui-cv/cv-list-chat/{uni-list-chat.scss → cv-list-chat.scss} +0 -0
- package/ui-cv/cv-list-chat/{uni-list-chat.vue → cv-list-chat.vue} +0 -0
- package/ui-cv/cv-list-item/cv-list-item.vue +449 -0
- package/ui-cv/cv-nav-bar/cv-nav-bar.vue +256 -0
- package/ui-cv/cv-nav-bar/{uni-status-bar.vue → cv-status-bar.vue} +0 -0
- package/ui-cv/cv-notice-bar/cv-notice-bar.vue +453 -0
- package/ui-cv/cv-number-box/cv-number-box.vue +223 -0
- package/ui-cv/cv-pagination/cv-pagination.vue +397 -0
- package/ui-cv/cv-popup/cv-popup.vue +429 -0
- package/ui-cv/cv-popup-dialog/{uni-popup-dialog.vue → cv-popup-dialog.vue} +0 -0
- package/ui-cv/cv-popup-message/cv-popup-message.vue +143 -0
- package/ui-cv/cv-popup-share/{uni-popup-share.vue → cv-popup-share.vue} +0 -0
- package/ui-cv/cv-row/{uni-row.vue → cv-row.vue} +1 -1
- package/ui-cv/cv-search-bar/cv-search-bar.vue +280 -0
- package/ui-cv/cv-section/{uni-section.vue → cv-section.vue} +0 -0
- package/ui-cv/cv-segmented-control/{uni-segmented-control.vue → cv-segmented-control.vue} +0 -0
- package/ui-cv/cv-status-bar/{uni-status-bar.vue → cv-status-bar.vue} +0 -0
- package/ui-cv/cv-steps/cv-steps.vue +293 -0
- package/ui-cv/cv-swipe-action/{uni-swipe-action.vue → cv-swipe-action.vue} +0 -0
- package/ui-cv/cv-swipe-action-item/{uni-swipe-action-item.vue → cv-swipe-action-item.vue} +0 -0
- package/ui-cv/cv-swiper-dot/cv-swiper-dot.vue +255 -0
- package/ui-cv/cv-table/cv-table.vue +460 -0
- package/ui-cv/cv-tag/cv-tag.vue +276 -0
- package/ui-cv/cv-tbody/cv-tbody.vue +28 -0
- package/ui-cv/cv-td/cv-td.vue +93 -0
- package/ui-cv/cv-test/{uni-test.vue → cv-test.vue} +0 -0
- package/ui-cv/cv-th/cv-th.vue +270 -0
- package/ui-cv/cv-thead/cv-thead.vue +114 -0
- package/ui-cv/cv-title/cv-title.vue +168 -0
- package/ui-cv/cv-tr/cv-tr.vue +166 -0
- package/ui-cv/cv-transition/cv-transition.vue +279 -0
- package/ui-cv/cv-calendar/uni-calendar-item.vue +0 -171
- package/ui-cv/cv-calendar/uni-calendar.vue +0 -504
- package/ui-cv/cv-card/uni-card.vue +0 -420
- package/ui-cv/cv-col/uni-col.vue +0 -2968
- package/ui-cv/cv-collapse/uni-collapse.vue +0 -146
- package/ui-cv/cv-collapse-item/uni-collapse-item.vue +0 -378
- package/ui-cv/cv-combox/uni-combox.vue +0 -237
- package/ui-cv/cv-countdown/uni-countdown.vue +0 -234
- package/ui-cv/cv-data-checkbox/uni-data-checkbox.vue +0 -792
- package/ui-cv/cv-data-indexed-list/uni-data-indexed-list-item.vue +0 -142
- package/ui-cv/cv-data-indexed-list/uni-data-indexed-list.vue +0 -364
- package/ui-cv/cv-data-picker/uni-data-picker.vue +0 -468
- package/ui-cv/cv-data-pickerview/uni-data-pickerview.vue +0 -298
- package/ui-cv/cv-dateformat/uni-dateformat.vue +0 -88
- package/ui-cv/cv-datetime-picker/uni-datetime-picker.vue +0 -874
- package/ui-cv/cv-easyinput/uni-easyinput.vue +0 -438
- package/ui-cv/cv-fab/uni-fab.vue +0 -443
- package/ui-cv/cv-fav/uni-fav.vue +0 -136
- package/ui-cv/cv-file-picker/uni-file-picker.vue +0 -614
- package/ui-cv/cv-indexed-list/uni-indexed-list-item.vue +0 -142
- package/ui-cv/cv-indexed-list/uni-indexed-list.vue +0 -357
- package/ui-cv/cv-list/uni-list.vue +0 -107
- package/ui-cv/cv-list/uni-refresh.vue +0 -65
- package/ui-cv/cv-list-ad/uni-list-ad.vue +0 -106
- package/ui-cv/cv-list-item/uni-list-item.vue +0 -428
- package/ui-cv/cv-nav-bar/uni-nav-bar.vue +0 -244
- package/ui-cv/cv-notice-bar/uni-notice-bar.vue +0 -394
- package/ui-cv/cv-number-box/uni-number-box.vue +0 -224
- package/ui-cv/cv-pagination/uni-pagination.vue +0 -376
- package/ui-cv/cv-popup/uni-popup.vue +0 -412
- package/ui-cv/cv-popup-message/uni-popup-message.vue +0 -143
- package/ui-cv/cv-search-bar/uni-search-bar.vue +0 -262
- package/ui-cv/cv-steps/uni-steps.vue +0 -250
- package/ui-cv/cv-swiper-dot/uni-swiper-dot.vue +0 -205
- package/ui-cv/cv-table/uni-table.vue +0 -455
- package/ui-cv/cv-tag/uni-tag.vue +0 -283
- package/ui-cv/cv-tbody/uni-tbody.vue +0 -30
- package/ui-cv/cv-td/uni-td.vue +0 -88
- package/ui-cv/cv-th/uni-th.vue +0 -259
- package/ui-cv/cv-thead/uni-thead.vue +0 -114
- package/ui-cv/cv-title/uni-title.vue +0 -171
- package/ui-cv/cv-tr/uni-tr.vue +0 -156
- package/ui-cv/cv-transition/uni-transition.vue +0 -287
|
@@ -1,899 +1,907 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
2
|
+
<view class="uni-datetime-picker">
|
|
3
|
+
<view @click="initTimePicker">
|
|
4
|
+
<slot>
|
|
5
|
+
<view
|
|
6
|
+
class="uni-datetime-picker-timebox-pointer"
|
|
7
|
+
:class="{ 'uni-datetime-picker-disabled': disabled, 'uni-datetime-picker-timebox': border }"
|
|
8
|
+
>
|
|
9
|
+
<text class="uni-datetime-picker-text">{{ time }}</text>
|
|
10
|
+
<view v-if="!time" class="uni-datetime-picker-time">
|
|
11
|
+
<text class="uni-datetime-picker-text">选择{{ title }}</text>
|
|
12
|
+
</view>
|
|
13
|
+
</view>
|
|
14
|
+
</slot>
|
|
15
|
+
</view>
|
|
16
|
+
<view v-if="visible" id="mask" class="uni-datetime-picker-mask" @click="tiggerTimePicker"></view>
|
|
17
|
+
<view
|
|
18
|
+
v-if="visible"
|
|
19
|
+
class="uni-datetime-picker-popup"
|
|
20
|
+
:class="[dateShow && timeShow ? '' : 'fix-nvue-height']"
|
|
21
|
+
:style="fixNvueBug"
|
|
22
|
+
>
|
|
23
|
+
<view class="uni-title">
|
|
24
|
+
<text class="uni-datetime-picker-text">设置{{ title }}</text>
|
|
25
|
+
</view>
|
|
26
|
+
<view v-if="dateShow" class="uni-datetime-picker__container-box">
|
|
27
|
+
<picker-view class="uni-datetime-picker-view" :indicator-style="indicatorStyle" :value="ymd" @change="bindDateChange">
|
|
28
|
+
<picker-view-column>
|
|
29
|
+
<view class="uni-datetime-picker-item" v-for="(item, index) in years" :key="index">
|
|
30
|
+
<text class="uni-datetime-picker-item">{{ lessThanTen(item) }}</text>
|
|
31
|
+
</view>
|
|
32
|
+
</picker-view-column>
|
|
33
|
+
<picker-view-column>
|
|
34
|
+
<view class="uni-datetime-picker-item" v-for="(item, index) in months" :key="index">
|
|
35
|
+
<text class="uni-datetime-picker-item">{{ lessThanTen(item) }}</text>
|
|
36
|
+
</view>
|
|
37
|
+
</picker-view-column>
|
|
38
|
+
<picker-view-column>
|
|
39
|
+
<view class="uni-datetime-picker-item" v-for="(item, index) in days" :key="index">
|
|
40
|
+
<text class="uni-datetime-picker-item">{{ lessThanTen(item) }}</text>
|
|
41
|
+
</view>
|
|
42
|
+
</picker-view-column>
|
|
43
|
+
</picker-view>
|
|
44
|
+
<!-- 兼容 nvue 不支持伪类 -->
|
|
45
|
+
<text class="uni-datetime-picker-sign sign-left">-</text>
|
|
46
|
+
<text class="uni-datetime-picker-sign sign-right">-</text>
|
|
47
|
+
</view>
|
|
48
|
+
<view v-if="timeShow" class="uni-datetime-picker__container-box">
|
|
49
|
+
<picker-view
|
|
50
|
+
class="uni-datetime-picker-view"
|
|
51
|
+
:class="[hideSecond ? 'time-hide-second' : '']"
|
|
52
|
+
:indicator-style="indicatorStyle"
|
|
53
|
+
:value="hms"
|
|
54
|
+
@change="bindTimeChange"
|
|
55
|
+
>
|
|
56
|
+
<picker-view-column>
|
|
57
|
+
<view class="uni-datetime-picker-item" v-for="(item, index) in hours" :key="index">
|
|
58
|
+
<text class="uni-datetime-picker-item">{{ lessThanTen(item) }}</text>
|
|
59
|
+
</view>
|
|
60
|
+
</picker-view-column>
|
|
61
|
+
<picker-view-column>
|
|
62
|
+
<view class="uni-datetime-picker-item" v-for="(item, index) in minutes" :key="index">
|
|
63
|
+
<text class="uni-datetime-picker-item">{{ lessThanTen(item) }}</text>
|
|
64
|
+
</view>
|
|
65
|
+
</picker-view-column>
|
|
66
|
+
<picker-view-column v-if="!hideSecond">
|
|
67
|
+
<view class="uni-datetime-picker-item" v-for="(item, index) in seconds" :key="index">
|
|
68
|
+
<text class="uni-datetime-picker-item">{{ lessThanTen(item) }}</text>
|
|
69
|
+
</view>
|
|
70
|
+
</picker-view-column>
|
|
71
|
+
</picker-view>
|
|
72
|
+
<!-- 兼容 nvue 不支持伪类 -->
|
|
73
|
+
<text class="uni-datetime-picker-sign" :class="[hideSecond ? 'sign-center' : 'sign-left']">:</text>
|
|
74
|
+
<text v-if="!hideSecond" class="uni-datetime-picker-sign sign-right">:</text>
|
|
75
|
+
</view>
|
|
76
|
+
<view class="uni-datetime-picker-btn">
|
|
77
|
+
<view @click="clearTime">
|
|
78
|
+
<text class="uni-datetime-picker-btn-text">清空</text>
|
|
79
|
+
</view>
|
|
80
|
+
<view class="uni-datetime-picker-btn-group">
|
|
81
|
+
<view class="uni-datetime-picker-cancel" @click="tiggerTimePicker">
|
|
82
|
+
<text class="uni-datetime-picker-btn-text">取消</text>
|
|
83
|
+
</view>
|
|
84
|
+
<view @click="setTime">
|
|
85
|
+
<text class="uni-datetime-picker-btn-text">确定</text>
|
|
86
|
+
</view>
|
|
87
|
+
</view>
|
|
88
|
+
</view>
|
|
89
|
+
</view>
|
|
90
|
+
<!-- #ifdef H5 -->
|
|
91
|
+
<!-- <keypress v-if="visible" @esc="tiggerTimePicker" @enter="setTime" /> -->
|
|
92
|
+
<!-- #endif -->
|
|
93
|
+
</view>
|
|
80
94
|
</template>
|
|
81
95
|
|
|
82
96
|
<script>
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
setTime() {
|
|
738
|
-
this.initTime()
|
|
739
|
-
this.tiggerTimePicker()
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
97
|
+
// #ifdef H5
|
|
98
|
+
import keypress from './keypress';
|
|
99
|
+
// #endif
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* DatetimePicker 时间选择器
|
|
103
|
+
* @description 可以同时选择日期和时间的选择器
|
|
104
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=xxx
|
|
105
|
+
* @property {String} type = [datetime | date | time] 显示模式
|
|
106
|
+
* @property {Boolean} multiple = [true|false] 是否多选
|
|
107
|
+
* @property {String|Number} value 默认值
|
|
108
|
+
* @property {String|Number} start 起始日期或时间
|
|
109
|
+
* @property {String|Number} end 起始日期或时间
|
|
110
|
+
* @property {String} return-type = [timestamp | string]
|
|
111
|
+
* @event {Function} change 选中发生变化触发
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
export default {
|
|
115
|
+
name: 'cvDatetimePicker',
|
|
116
|
+
components: {
|
|
117
|
+
// #ifdef H5
|
|
118
|
+
keypress
|
|
119
|
+
// #endif
|
|
120
|
+
},
|
|
121
|
+
data() {
|
|
122
|
+
return {
|
|
123
|
+
indicatorStyle: `height: 50px;`,
|
|
124
|
+
visible: false,
|
|
125
|
+
fixNvueBug: {},
|
|
126
|
+
dateShow: true,
|
|
127
|
+
timeShow: true,
|
|
128
|
+
title: '日期和时间',
|
|
129
|
+
// 输入框当前时间
|
|
130
|
+
time: '',
|
|
131
|
+
// 当前的年月日时分秒
|
|
132
|
+
year: 1900,
|
|
133
|
+
month: 0,
|
|
134
|
+
day: 0,
|
|
135
|
+
hour: 0,
|
|
136
|
+
minute: 0,
|
|
137
|
+
second: 0,
|
|
138
|
+
// 起始时间
|
|
139
|
+
startYear: 1920,
|
|
140
|
+
startMonth: 1,
|
|
141
|
+
startDay: 1,
|
|
142
|
+
startHour: 0,
|
|
143
|
+
startMinute: 0,
|
|
144
|
+
startSecond: 0,
|
|
145
|
+
// 结束时间
|
|
146
|
+
endYear: 2120,
|
|
147
|
+
endMonth: 12,
|
|
148
|
+
endDay: 31,
|
|
149
|
+
endHour: 23,
|
|
150
|
+
endMinute: 59,
|
|
151
|
+
endSecond: 59
|
|
152
|
+
};
|
|
153
|
+
},
|
|
154
|
+
props: {
|
|
155
|
+
type: {
|
|
156
|
+
type: String,
|
|
157
|
+
default: 'datetime'
|
|
158
|
+
},
|
|
159
|
+
value: {
|
|
160
|
+
type: [String, Number],
|
|
161
|
+
default: ''
|
|
162
|
+
},
|
|
163
|
+
modelValue: {
|
|
164
|
+
type: [String, Number],
|
|
165
|
+
default: ''
|
|
166
|
+
},
|
|
167
|
+
start: {
|
|
168
|
+
type: [Number, String],
|
|
169
|
+
default: ''
|
|
170
|
+
},
|
|
171
|
+
end: {
|
|
172
|
+
type: [Number, String],
|
|
173
|
+
default: ''
|
|
174
|
+
},
|
|
175
|
+
returnType: {
|
|
176
|
+
type: String,
|
|
177
|
+
default: 'string'
|
|
178
|
+
},
|
|
179
|
+
disabled: {
|
|
180
|
+
type: [Boolean, String],
|
|
181
|
+
default: false
|
|
182
|
+
},
|
|
183
|
+
border: {
|
|
184
|
+
type: [Boolean, String],
|
|
185
|
+
default: true
|
|
186
|
+
},
|
|
187
|
+
hideSecond: {
|
|
188
|
+
type: [Boolean, String],
|
|
189
|
+
default: false
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
watch: {
|
|
193
|
+
value: {
|
|
194
|
+
handler(newVal, oldVal) {
|
|
195
|
+
if (newVal) {
|
|
196
|
+
this.parseValue(this.fixIosDateFormat(newVal)); //兼容 iOS、safari 日期格式
|
|
197
|
+
this.initTime(false);
|
|
198
|
+
} else {
|
|
199
|
+
this.parseValue(Date.now());
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
immediate: true
|
|
203
|
+
},
|
|
204
|
+
type: {
|
|
205
|
+
handler(newValue) {
|
|
206
|
+
if (newValue === 'date') {
|
|
207
|
+
this.dateShow = true;
|
|
208
|
+
this.timeShow = false;
|
|
209
|
+
this.title = '日期';
|
|
210
|
+
} else if (newValue === 'time') {
|
|
211
|
+
this.dateShow = false;
|
|
212
|
+
this.timeShow = true;
|
|
213
|
+
this.title = '时间';
|
|
214
|
+
} else {
|
|
215
|
+
this.dateShow = true;
|
|
216
|
+
this.timeShow = true;
|
|
217
|
+
this.title = '日期和时间';
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
immediate: true
|
|
221
|
+
},
|
|
222
|
+
start: {
|
|
223
|
+
handler(newVal) {
|
|
224
|
+
this.parseDatetimeRange(this.fixIosDateFormat(newVal), 'start'); //兼容 iOS、safari 日期格式
|
|
225
|
+
},
|
|
226
|
+
immediate: true
|
|
227
|
+
},
|
|
228
|
+
end: {
|
|
229
|
+
handler(newVal) {
|
|
230
|
+
this.parseDatetimeRange(this.fixIosDateFormat(newVal), 'end'); //兼容 iOS、safari 日期格式
|
|
231
|
+
},
|
|
232
|
+
immediate: true
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
// 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
|
|
236
|
+
months(newVal) {
|
|
237
|
+
this.checkValue('month', this.month, newVal);
|
|
238
|
+
},
|
|
239
|
+
days(newVal) {
|
|
240
|
+
this.checkValue('day', this.day, newVal);
|
|
241
|
+
},
|
|
242
|
+
hours(newVal) {
|
|
243
|
+
this.checkValue('hour', this.hour, newVal);
|
|
244
|
+
},
|
|
245
|
+
minutes(newVal) {
|
|
246
|
+
this.checkValue('minute', this.minute, newVal);
|
|
247
|
+
},
|
|
248
|
+
seconds(newVal) {
|
|
249
|
+
this.checkValue('second', this.second, newVal);
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
computed: {
|
|
253
|
+
// 当前年、月、日、时、分、秒选择范围
|
|
254
|
+
years() {
|
|
255
|
+
return this.getCurrentRange('year');
|
|
256
|
+
},
|
|
257
|
+
|
|
258
|
+
months() {
|
|
259
|
+
return this.getCurrentRange('month');
|
|
260
|
+
},
|
|
261
|
+
|
|
262
|
+
days() {
|
|
263
|
+
return this.getCurrentRange('day');
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
hours() {
|
|
267
|
+
return this.getCurrentRange('hour');
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
minutes() {
|
|
271
|
+
return this.getCurrentRange('minute');
|
|
272
|
+
},
|
|
273
|
+
|
|
274
|
+
seconds() {
|
|
275
|
+
return this.getCurrentRange('second');
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
// picker 当前值数组
|
|
279
|
+
ymd() {
|
|
280
|
+
return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay];
|
|
281
|
+
},
|
|
282
|
+
hms() {
|
|
283
|
+
return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond];
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
// 当前 date 是 start
|
|
287
|
+
currentDateIsStart() {
|
|
288
|
+
return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay;
|
|
289
|
+
},
|
|
290
|
+
|
|
291
|
+
// 当前 date 是 end
|
|
292
|
+
currentDateIsEnd() {
|
|
293
|
+
return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay;
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
// 当前年、月、日、时、分、秒的最小值和最大值
|
|
297
|
+
minYear() {
|
|
298
|
+
return this.startYear;
|
|
299
|
+
},
|
|
300
|
+
maxYear() {
|
|
301
|
+
return this.endYear;
|
|
302
|
+
},
|
|
303
|
+
minMonth() {
|
|
304
|
+
if (this.year === this.startYear) {
|
|
305
|
+
return this.startMonth;
|
|
306
|
+
} else {
|
|
307
|
+
return 1;
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
maxMonth() {
|
|
311
|
+
if (this.year === this.endYear) {
|
|
312
|
+
return this.endMonth;
|
|
313
|
+
} else {
|
|
314
|
+
return 12;
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
minDay() {
|
|
318
|
+
if (this.year === this.startYear && this.month === this.startMonth) {
|
|
319
|
+
return this.startDay;
|
|
320
|
+
} else {
|
|
321
|
+
return 1;
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
maxDay() {
|
|
325
|
+
if (this.year === this.endYear && this.month === this.endMonth) {
|
|
326
|
+
return this.endDay;
|
|
327
|
+
} else {
|
|
328
|
+
return this.daysInMonth(this.year, this.month);
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
minHour() {
|
|
332
|
+
if (this.type === 'datetime') {
|
|
333
|
+
if (this.currentDateIsStart) {
|
|
334
|
+
return this.startHour;
|
|
335
|
+
} else {
|
|
336
|
+
return 0;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
if (this.type === 'time') {
|
|
340
|
+
return this.startHour;
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
maxHour() {
|
|
344
|
+
if (this.type === 'datetime') {
|
|
345
|
+
if (this.currentDateIsEnd) {
|
|
346
|
+
return this.endHour;
|
|
347
|
+
} else {
|
|
348
|
+
return 23;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (this.type === 'time') {
|
|
352
|
+
return this.endHour;
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
minMinute() {
|
|
356
|
+
if (this.type === 'datetime') {
|
|
357
|
+
if (this.currentDateIsStart && this.hour === this.startHour) {
|
|
358
|
+
return this.startMinute;
|
|
359
|
+
} else {
|
|
360
|
+
return 0;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
if (this.type === 'time') {
|
|
364
|
+
if (this.hour === this.startHour) {
|
|
365
|
+
return this.startMinute;
|
|
366
|
+
} else {
|
|
367
|
+
return 0;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
maxMinute() {
|
|
372
|
+
if (this.type === 'datetime') {
|
|
373
|
+
if (this.currentDateIsEnd && this.hour === this.endHour) {
|
|
374
|
+
return this.endMinute;
|
|
375
|
+
} else {
|
|
376
|
+
return 59;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
if (this.type === 'time') {
|
|
380
|
+
if (this.hour === this.endHour) {
|
|
381
|
+
return this.endMinute;
|
|
382
|
+
} else {
|
|
383
|
+
return 59;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
minSecond() {
|
|
388
|
+
if (this.type === 'datetime') {
|
|
389
|
+
if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
|
|
390
|
+
return this.startSecond;
|
|
391
|
+
} else {
|
|
392
|
+
return 0;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
if (this.type === 'time') {
|
|
396
|
+
if (this.hour === this.startHour && this.minute === this.startMinute) {
|
|
397
|
+
return this.startSecond;
|
|
398
|
+
} else {
|
|
399
|
+
return 0;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
maxSecond() {
|
|
404
|
+
if (this.type === 'datetime') {
|
|
405
|
+
if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
|
|
406
|
+
return this.endSecond;
|
|
407
|
+
} else {
|
|
408
|
+
return 59;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
if (this.type === 'time') {
|
|
412
|
+
if (this.hour === this.endHour && this.minute === this.endMinute) {
|
|
413
|
+
return this.endSecond;
|
|
414
|
+
} else {
|
|
415
|
+
return 59;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
|
|
421
|
+
mounted() {
|
|
422
|
+
// #ifdef APP-NVUE
|
|
423
|
+
const res = uni.getSystemInfoSync();
|
|
424
|
+
this.fixNvueBug = {
|
|
425
|
+
top: res.windowHeight / 2,
|
|
426
|
+
left: res.windowWidth / 2
|
|
427
|
+
};
|
|
428
|
+
// #endif
|
|
429
|
+
},
|
|
430
|
+
|
|
431
|
+
methods: {
|
|
432
|
+
/**
|
|
433
|
+
* @param {Object} item
|
|
434
|
+
* 小于 10 在前面加个 0
|
|
435
|
+
*/
|
|
436
|
+
|
|
437
|
+
lessThanTen(item) {
|
|
438
|
+
return item < 10 ? '0' + item : item;
|
|
439
|
+
},
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* 解析时分秒字符串,例如:00:00:00
|
|
443
|
+
* @param {String} timeString
|
|
444
|
+
*/
|
|
445
|
+
parseTimeType(timeString) {
|
|
446
|
+
if (timeString) {
|
|
447
|
+
let timeArr = timeString.split(':');
|
|
448
|
+
this.hour = Number(timeArr[0]);
|
|
449
|
+
this.minute = Number(timeArr[1]);
|
|
450
|
+
this.second = Number(timeArr[2]);
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
|
|
456
|
+
* @param {String | Number} datetime
|
|
457
|
+
*/
|
|
458
|
+
initPickerValue(datetime) {
|
|
459
|
+
let defaultValue = null;
|
|
460
|
+
if (datetime) {
|
|
461
|
+
defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end);
|
|
462
|
+
} else {
|
|
463
|
+
defaultValue = Date.now();
|
|
464
|
+
defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end);
|
|
465
|
+
}
|
|
466
|
+
this.parseValue(defaultValue);
|
|
467
|
+
},
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* 初始值规则:
|
|
471
|
+
* - 用户设置初始值 value
|
|
472
|
+
* - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
|
|
473
|
+
* - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
|
|
474
|
+
* - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
|
|
475
|
+
* - 无起始终止时间,则初始值为 value
|
|
476
|
+
* - 无初始值 value,则初始值为当前本地时间 Date.now()
|
|
477
|
+
* @param {Object} value
|
|
478
|
+
* @param {Object} dateBase
|
|
479
|
+
*/
|
|
480
|
+
compareValueWithStartAndEnd(value, start, end) {
|
|
481
|
+
let winner = null;
|
|
482
|
+
value = this.superTimeStamp(value);
|
|
483
|
+
start = this.superTimeStamp(start);
|
|
484
|
+
end = this.superTimeStamp(end);
|
|
485
|
+
|
|
486
|
+
if (start && end) {
|
|
487
|
+
if (value < start) {
|
|
488
|
+
winner = new Date(start);
|
|
489
|
+
} else if (value > end) {
|
|
490
|
+
winner = new Date(end);
|
|
491
|
+
} else {
|
|
492
|
+
winner = new Date(value);
|
|
493
|
+
}
|
|
494
|
+
} else if (start && !end) {
|
|
495
|
+
winner = start <= value ? new Date(value) : new Date(start);
|
|
496
|
+
} else if (!start && end) {
|
|
497
|
+
winner = value <= end ? new Date(value) : new Date(end);
|
|
498
|
+
} else {
|
|
499
|
+
winner = new Date(value);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
return winner;
|
|
503
|
+
},
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* 转换为可比较的时间戳,接受日期、时分秒、时间戳
|
|
507
|
+
* @param {Object} value
|
|
508
|
+
*/
|
|
509
|
+
superTimeStamp(value) {
|
|
510
|
+
let dateBase = '';
|
|
511
|
+
if (this.type === 'time' && value && typeof value === 'string') {
|
|
512
|
+
const now = new Date();
|
|
513
|
+
const year = now.getFullYear();
|
|
514
|
+
const month = now.getMonth() + 1;
|
|
515
|
+
const day = now.getDate();
|
|
516
|
+
dateBase = year + '/' + month + '/' + day + ' ';
|
|
517
|
+
}
|
|
518
|
+
if (Number(value) && typeof value !== NaN) {
|
|
519
|
+
value = parseInt(value);
|
|
520
|
+
dateBase = 0;
|
|
521
|
+
}
|
|
522
|
+
return this.createTimeStamp(dateBase + value);
|
|
523
|
+
},
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* 解析默认值 value,字符串、时间戳
|
|
527
|
+
* @param {Object} defaultTime
|
|
528
|
+
*/
|
|
529
|
+
parseValue(value) {
|
|
530
|
+
if (!value) return;
|
|
531
|
+
if (this.type === 'time' && typeof value === 'string') {
|
|
532
|
+
this.parseTimeType(value);
|
|
533
|
+
} else {
|
|
534
|
+
let defaultDate = null;
|
|
535
|
+
defaultDate = new Date(value);
|
|
536
|
+
if (this.type !== 'time') {
|
|
537
|
+
this.year = defaultDate.getFullYear();
|
|
538
|
+
this.month = defaultDate.getMonth() + 1;
|
|
539
|
+
this.day = defaultDate.getDate();
|
|
540
|
+
}
|
|
541
|
+
if (this.type !== 'date') {
|
|
542
|
+
this.hour = defaultDate.getHours();
|
|
543
|
+
this.minute = defaultDate.getMinutes();
|
|
544
|
+
this.second = defaultDate.getSeconds();
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
if (this.hideSecond) {
|
|
548
|
+
this.second = 0;
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* 解析可选择时间范围 start、end,年月日字符串、时间戳
|
|
554
|
+
* @param {Object} defaultTime
|
|
555
|
+
*/
|
|
556
|
+
parseDatetimeRange(point, pointType) {
|
|
557
|
+
// 时间为空,则重置为初始值
|
|
558
|
+
if (!point) {
|
|
559
|
+
if (pointType === 'start') {
|
|
560
|
+
this.startYear = 1920;
|
|
561
|
+
this.startMonth = 1;
|
|
562
|
+
this.startDay = 1;
|
|
563
|
+
this.startHour = 0;
|
|
564
|
+
this.startMinute = 0;
|
|
565
|
+
this.startSecond = 0;
|
|
566
|
+
}
|
|
567
|
+
if (pointType === 'end') {
|
|
568
|
+
this.endYear = 120;
|
|
569
|
+
this.endMonth = 12;
|
|
570
|
+
this.endDay = 31;
|
|
571
|
+
this.endHour = 23;
|
|
572
|
+
this.endMinute = 59;
|
|
573
|
+
this.endSecond = 59;
|
|
574
|
+
}
|
|
575
|
+
return;
|
|
576
|
+
}
|
|
577
|
+
if (this.type === 'time') {
|
|
578
|
+
const pointArr = point.split(':');
|
|
579
|
+
this[pointType + 'Hour'] = Number(pointArr[0]);
|
|
580
|
+
this[pointType + 'Minute'] = Number(pointArr[1]);
|
|
581
|
+
this[pointType + 'Second'] = Number(pointArr[2]);
|
|
582
|
+
} else {
|
|
583
|
+
if (!point) {
|
|
584
|
+
pointType === 'start' ? (this.startYear = this.year - 60) : (this.endYear = this.year + 60);
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
if (Number(point) && Number(point) !== NaN) {
|
|
588
|
+
point = parseInt(point);
|
|
589
|
+
}
|
|
590
|
+
// datetime 的 end 没有时分秒, 则不限制
|
|
591
|
+
const hasTime = /[0-9]:[0-9]/;
|
|
592
|
+
if (this.type === 'datetime' && pointType === 'end' && typeof point === 'string' && !hasTime.test(point)) {
|
|
593
|
+
point = point + ' 23:59:59';
|
|
594
|
+
}
|
|
595
|
+
const pointDate = new Date(point);
|
|
596
|
+
this[pointType + 'Year'] = pointDate.getFullYear();
|
|
597
|
+
this[pointType + 'Month'] = pointDate.getMonth() + 1;
|
|
598
|
+
this[pointType + 'Day'] = pointDate.getDate();
|
|
599
|
+
if (this.type === 'datetime') {
|
|
600
|
+
this[pointType + 'Hour'] = pointDate.getHours();
|
|
601
|
+
this[pointType + 'Minute'] = pointDate.getMinutes();
|
|
602
|
+
this[pointType + 'Second'] = pointDate.getSeconds();
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
|
|
607
|
+
// 获取 年、月、日、时、分、秒 当前可选范围
|
|
608
|
+
getCurrentRange(value) {
|
|
609
|
+
const range = [];
|
|
610
|
+
for (let i = this['min' + this.capitalize(value)]; i <= this['max' + this.capitalize(value)]; i++) {
|
|
611
|
+
range.push(i);
|
|
612
|
+
}
|
|
613
|
+
return range;
|
|
614
|
+
},
|
|
615
|
+
|
|
616
|
+
// 字符串首字母大写
|
|
617
|
+
capitalize(str) {
|
|
618
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
619
|
+
},
|
|
620
|
+
|
|
621
|
+
// 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
|
|
622
|
+
checkValue(name, value, values) {
|
|
623
|
+
if (values.indexOf(value) === -1) {
|
|
624
|
+
this[name] = values[0];
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
|
|
628
|
+
// 每个月的实际天数
|
|
629
|
+
daysInMonth(year, month) {
|
|
630
|
+
// Use 1 for January, 2 for February, etc.
|
|
631
|
+
return new Date(year, month, 0).getDate();
|
|
632
|
+
},
|
|
633
|
+
|
|
634
|
+
//兼容 iOS、safari 日期格式
|
|
635
|
+
fixIosDateFormat(value) {
|
|
636
|
+
if (typeof value === 'string') {
|
|
637
|
+
value = value.replace(/-/g, '/');
|
|
638
|
+
}
|
|
639
|
+
return value;
|
|
640
|
+
},
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* 生成时间戳
|
|
644
|
+
* @param {Object} time
|
|
645
|
+
*/
|
|
646
|
+
createTimeStamp(time) {
|
|
647
|
+
if (!time) return;
|
|
648
|
+
if (typeof time === 'number') {
|
|
649
|
+
return time;
|
|
650
|
+
} else {
|
|
651
|
+
time = time.replace(/-/g, '/');
|
|
652
|
+
if (this.type === 'date') {
|
|
653
|
+
time = time + ' ' + '00:00:00';
|
|
654
|
+
}
|
|
655
|
+
return Date.parse(time);
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* 生成日期或时间的字符串
|
|
661
|
+
*/
|
|
662
|
+
createDomSting() {
|
|
663
|
+
const yymmdd = this.year + '-' + this.lessThanTen(this.month) + '-' + this.lessThanTen(this.day);
|
|
664
|
+
|
|
665
|
+
let hhmmss = this.lessThanTen(this.hour) + ':' + this.lessThanTen(this.minute);
|
|
666
|
+
|
|
667
|
+
if (!this.hideSecond) {
|
|
668
|
+
hhmmss = hhmmss + ':' + this.lessThanTen(this.second);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
if (this.type === 'date') {
|
|
672
|
+
return yymmdd;
|
|
673
|
+
} else if (this.type === 'time') {
|
|
674
|
+
return hhmmss;
|
|
675
|
+
} else {
|
|
676
|
+
return yymmdd + ' ' + hhmmss;
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* 初始化返回值,并抛出 change 事件
|
|
682
|
+
*/
|
|
683
|
+
initTime(emit = true) {
|
|
684
|
+
this.time = this.createDomSting();
|
|
685
|
+
if (!emit) return;
|
|
686
|
+
if (this.returnType === 'timestamp' && this.type !== 'time') {
|
|
687
|
+
this.$emit('change', this.createTimeStamp(this.time));
|
|
688
|
+
this.$emit('input', this.createTimeStamp(this.time));
|
|
689
|
+
this.$emit('update:modelValue', this.createTimeStamp(this.time));
|
|
690
|
+
} else {
|
|
691
|
+
this.$emit('change', this.time);
|
|
692
|
+
this.$emit('input', this.time);
|
|
693
|
+
this.$emit('update:modelValue', this.time);
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* 用户选择日期或时间更新 data
|
|
699
|
+
* @param {Object} e
|
|
700
|
+
*/
|
|
701
|
+
bindDateChange(e) {
|
|
702
|
+
const val = e.detail.value;
|
|
703
|
+
this.year = this.years[val[0]];
|
|
704
|
+
this.month = this.months[val[1]];
|
|
705
|
+
this.day = this.days[val[2]];
|
|
706
|
+
},
|
|
707
|
+
bindTimeChange(e) {
|
|
708
|
+
const val = e.detail.value;
|
|
709
|
+
this.hour = this.hours[val[0]];
|
|
710
|
+
this.minute = this.minutes[val[1]];
|
|
711
|
+
this.second = this.seconds[val[2]];
|
|
712
|
+
},
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* 初始化弹出层
|
|
716
|
+
*/
|
|
717
|
+
initTimePicker() {
|
|
718
|
+
if (this.disabled) return;
|
|
719
|
+
const value = this.fixIosDateFormat(this.value);
|
|
720
|
+
this.initPickerValue(value);
|
|
721
|
+
this.visible = !this.visible;
|
|
722
|
+
},
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* 触发或关闭弹框
|
|
726
|
+
*/
|
|
727
|
+
tiggerTimePicker(e) {
|
|
728
|
+
this.visible = !this.visible;
|
|
729
|
+
},
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* 用户点击“清空”按钮,清空当前值
|
|
733
|
+
*/
|
|
734
|
+
clearTime() {
|
|
735
|
+
this.time = '';
|
|
736
|
+
this.$emit('change', this.time);
|
|
737
|
+
this.$emit('input', this.time);
|
|
738
|
+
this.$emit('update:modelValue', this.time);
|
|
739
|
+
this.tiggerTimePicker();
|
|
740
|
+
},
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* 用户点击“确定”按钮
|
|
744
|
+
*/
|
|
745
|
+
setTime() {
|
|
746
|
+
this.initTime();
|
|
747
|
+
this.tiggerTimePicker();
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
};
|
|
743
751
|
</script>
|
|
744
752
|
|
|
745
753
|
<style scoped>
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
</style>
|
|
754
|
+
@charset "UTF-8";
|
|
755
|
+
|
|
756
|
+
.uni-datetime-picker {
|
|
757
|
+
/* #ifndef APP-NVUE */
|
|
758
|
+
width: 100%;
|
|
759
|
+
/* #endif */
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.uni-datetime-picker-view {
|
|
763
|
+
height: 130px;
|
|
764
|
+
width: 270px;
|
|
765
|
+
/* #ifndef APP-NVUE */
|
|
766
|
+
cursor: pointer;
|
|
767
|
+
/* #endif */
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.uni-datetime-picker-item {
|
|
771
|
+
height: 50px;
|
|
772
|
+
line-height: 50px;
|
|
773
|
+
text-align: center;
|
|
774
|
+
font-size: 14px;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.uni-datetime-picker-btn {
|
|
778
|
+
margin-top: 60px;
|
|
779
|
+
/* #ifndef APP-NVUE */
|
|
780
|
+
display: flex;
|
|
781
|
+
cursor: pointer;
|
|
782
|
+
/* #endif */
|
|
783
|
+
flex-direction: row;
|
|
784
|
+
justify-content: space-between;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
.uni-datetime-picker-btn-text {
|
|
788
|
+
font-size: 14px;
|
|
789
|
+
color: #007aff;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.uni-datetime-picker-btn-group {
|
|
793
|
+
/* #ifndef APP-NVUE */
|
|
794
|
+
display: flex;
|
|
795
|
+
/* #endif */
|
|
796
|
+
flex-direction: row;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.uni-datetime-picker-cancel {
|
|
800
|
+
margin-right: 30px;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.uni-datetime-picker-mask {
|
|
804
|
+
position: fixed;
|
|
805
|
+
bottom: 0px;
|
|
806
|
+
top: 0px;
|
|
807
|
+
left: 0px;
|
|
808
|
+
right: 0px;
|
|
809
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
810
|
+
transition-duration: 0.3s;
|
|
811
|
+
z-index: 998;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
.uni-datetime-picker-popup {
|
|
815
|
+
border-radius: 8px;
|
|
816
|
+
padding: 30px;
|
|
817
|
+
width: 270px;
|
|
818
|
+
/* #ifdef APP-NVUE */
|
|
819
|
+
height: 500px;
|
|
820
|
+
/* #endif */
|
|
821
|
+
/* #ifdef APP-NVUE */
|
|
822
|
+
width: 330px;
|
|
823
|
+
/* #endif */
|
|
824
|
+
background-color: #fff;
|
|
825
|
+
position: fixed;
|
|
826
|
+
top: 50%;
|
|
827
|
+
left: 50%;
|
|
828
|
+
transform: translate(-50%, -50%);
|
|
829
|
+
transition-duration: 0.3s;
|
|
830
|
+
z-index: 999;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.fix-nvue-height {
|
|
834
|
+
/* #ifdef APP-NVUE */
|
|
835
|
+
height: 330px;
|
|
836
|
+
/* #endif */
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.uni-datetime-picker-time {
|
|
840
|
+
color: grey;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.uni-datetime-picker-column {
|
|
844
|
+
height: 50px;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.uni-datetime-picker-timebox {
|
|
848
|
+
border: 1px solid #e5e5e5;
|
|
849
|
+
border-radius: 5px;
|
|
850
|
+
padding: 7px 10px;
|
|
851
|
+
/* #ifndef APP-NVUE */
|
|
852
|
+
box-sizing: border-box;
|
|
853
|
+
cursor: pointer;
|
|
854
|
+
/* #endif */
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
.uni-datetime-picker-timebox-pointer {
|
|
858
|
+
/* #ifndef APP-NVUE */
|
|
859
|
+
cursor: pointer;
|
|
860
|
+
/* #endif */
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
.uni-datetime-picker-disabled {
|
|
864
|
+
opacity: 0.4;
|
|
865
|
+
/* #ifdef H5 */
|
|
866
|
+
cursor: not-allowed !important;
|
|
867
|
+
/* #endif */
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.uni-datetime-picker-text {
|
|
871
|
+
font-size: 14px;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.uni-datetime-picker-sign {
|
|
875
|
+
position: absolute;
|
|
876
|
+
top: 53px;
|
|
877
|
+
/* 减掉 10px 的元素高度,兼容nvue */
|
|
878
|
+
color: #999;
|
|
879
|
+
/* #ifdef APP-NVUE */
|
|
880
|
+
font-size: 16px;
|
|
881
|
+
/* #endif */
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
.sign-left {
|
|
885
|
+
left: 86px;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
.sign-right {
|
|
889
|
+
right: 86px;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
.sign-center {
|
|
893
|
+
left: 135px;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.uni-datetime-picker__container-box {
|
|
897
|
+
position: relative;
|
|
898
|
+
display: flex;
|
|
899
|
+
align-items: center;
|
|
900
|
+
justify-content: center;
|
|
901
|
+
margin-top: 40px;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
.time-hide-second {
|
|
905
|
+
width: 180px;
|
|
906
|
+
}
|
|
907
|
+
</style>
|