@vtj/materials 0.10.5 → 0.10.7
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/dist/assets/antdv/index.umd.js +2 -2
- package/dist/assets/charts/index.umd.js +2 -2
- package/dist/assets/element/index.umd.js +2 -2
- package/dist/assets/ui/index.umd.js +2 -2
- package/dist/assets/uni-h5/index.umd.js +3 -3
- package/dist/assets/uni-ui/index.umd.js +3 -3
- package/dist/assets/vant/index.umd.js +2 -2
- package/dist/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/deps/@vtj/ui/index.umd.js +3 -3
- package/dist/deps/@vtj/utils/index.umd.js +20 -20
- package/dist/deps/@vueuse/core/index.iife.min.js +1 -1
- package/dist/deps/uni-ui/index.umd.js +1 -1
- package/dist/deps/uni-ui/style.css +1 -1
- package/package.json +7 -7
- package/src/uni-h5/components/input.ts +2 -2
- package/src/uni-h5/components/scrollView.ts +3 -3
- package/src/uni-h5/components/video.ts +1 -1
- package/src/uni-ui/components/badge.ts +1 -5
- package/src/uni-ui/components/breadcrumb.ts +1 -20
- package/src/uni-ui/components/collapse.ts +22 -23
- package/src/uni-ui/components/grid.ts +0 -9
- package/src/uni-ui/components/group.ts +1 -10
- package/src/uni-ui/components/index.ts +4 -4
- package/src/uni-ui/components/popup.ts +10 -2
- package/src/uni-ui/components/swiperDot.ts +21 -7
- package/src/uni-ui/components/table.ts +9 -3
- package/src/uni-ui/components/transition.ts +10 -1
- package/src/uni-ui/index.ts +19 -44
- package/src/uni-ui/lib/uni-collapse/uni-collapse.vue +153 -0
- package/src/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +425 -0
- package/src/uni-ui/lib/uni-data-picker/keypress.js +45 -0
- package/src/uni-ui/lib/uni-data-picker/uni-data-picker.vue +604 -0
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +622 -0
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.css +76 -0
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +335 -0
- package/src/uni-ui/lib/uni-datetime-picker/calendar-item.vue +181 -170
- package/src/uni-ui/lib/uni-datetime-picker/calendar.vue +977 -939
- package/src/uni-ui/lib/uni-datetime-picker/time-picker.vue +1024 -932
- package/src/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +15 -17
- package/src/uni-ui/lib/uni-datetime-picker/util.js +419 -392
- package/src/uni-ui/lib/uni-fav/i18n/en.json +4 -0
- package/src/uni-ui/lib/uni-fav/i18n/index.js +8 -0
- package/src/uni-ui/lib/uni-fav/i18n/zh-Hans.json +4 -0
- package/src/uni-ui/lib/uni-fav/i18n/zh-Hant.json +4 -0
- package/src/uni-ui/lib/uni-fav/uni-fav.vue +170 -0
- package/src/uni-ui/lib/uni-file-picker/choose-and-upload-file.js +280 -0
- package/src/uni-ui/lib/uni-file-picker/uni-file-picker.vue +668 -0
- package/src/uni-ui/lib/uni-file-picker/upload-file.vue +325 -0
- package/src/uni-ui/lib/uni-file-picker/upload-image.vue +292 -0
- package/src/uni-ui/lib/uni-file-picker/utils.js +110 -0
- package/src/uni-ui/lib/uni-grid/uni-grid.vue +148 -0
- package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +152 -128
- package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +50 -50
- package/src/uni-ui/lib/uni-load-more/i18n/en.json +5 -0
- package/src/uni-ui/lib/uni-load-more/i18n/index.js +8 -0
- package/src/uni-ui/lib/uni-load-more/i18n/zh-Hans.json +5 -0
- package/src/uni-ui/lib/uni-load-more/i18n/zh-Hant.json +5 -0
- package/src/uni-ui/lib/uni-load-more/uni-load-more.vue +456 -0
- package/src/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +484 -0
- package/src/uni-ui/lib/uni-popup/uni-popup.vue +4 -4
- package/src/uni-ui/lib/uni-popup-message/uni-popup-message.vue +149 -0
- package/src/uni-ui/lib/uni-rate/uni-rate.vue +362 -343
- package/src/uni-ui/lib/uni-row/uni-row.vue +193 -0
- package/src/uni-ui/lib/uni-search-bar/i18n/en.json +4 -0
- package/src/uni-ui/lib/uni-search-bar/i18n/index.js +8 -0
- package/src/uni-ui/lib/uni-search-bar/i18n/zh-Hans.json +4 -0
- package/src/uni-ui/lib/uni-search-bar/i18n/zh-Hant.json +4 -0
- package/src/uni-ui/lib/uni-search-bar/uni-search-bar.vue +339 -0
- package/src/uni-ui/lib/uni-swipe-action-item/bindingx.js +294 -285
- package/src/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +8 -9
- package/src/uni-ui/lib/uni-th/filter-dropdown.vue +551 -503
- package/src/uni-ui/lib/uni-tr/table-checkbox.vue +165 -163
- package/src/uni-ui/lib/uni-tr/uni-tr.vue +6 -6
- package/src/uni-ui/lib/uni-transition/createAnimation.js +131 -0
- package/src/uni-ui/lib/uni-transition/uni-transition.vue +310 -0
- package/src/version.ts +2 -2
@@ -1,947 +1,985 @@
|
|
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
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
2
|
+
<view class="uni-calendar" @mouseleave="leaveCale">
|
3
|
+
<view
|
4
|
+
v-if="!insert && show"
|
5
|
+
class="uni-calendar__mask"
|
6
|
+
:class="{ 'uni-calendar--mask-show': aniMaskShow }"
|
7
|
+
@click="maskClick"></view>
|
8
|
+
|
9
|
+
<view
|
10
|
+
v-if="insert || show"
|
11
|
+
class="uni-calendar__content"
|
12
|
+
:class="{
|
13
|
+
'uni-calendar--fixed': !insert,
|
14
|
+
'uni-calendar--ani-show': aniMaskShow,
|
15
|
+
'uni-calendar__content-mobile': aniMaskShow
|
16
|
+
}">
|
17
|
+
<view
|
18
|
+
class="uni-calendar__header"
|
19
|
+
:class="{ 'uni-calendar__header-mobile': !insert }">
|
20
|
+
<view
|
21
|
+
class="uni-calendar__header-btn-box"
|
22
|
+
@click.stop="changeMonth('pre')">
|
23
|
+
<view class="uni-calendar__header-btn uni-calendar--left"></view>
|
24
|
+
</view>
|
25
|
+
|
26
|
+
<picker
|
27
|
+
mode="date"
|
28
|
+
:value="date"
|
29
|
+
fields="month"
|
30
|
+
@change="bindDateChange">
|
31
|
+
<text class="uni-calendar__header-text">{{
|
32
|
+
(nowDate.year || '') + yearText + (nowDate.month || '') + monthText
|
33
|
+
}}</text>
|
34
|
+
</picker>
|
35
|
+
|
36
|
+
<view
|
37
|
+
class="uni-calendar__header-btn-box"
|
38
|
+
@click.stop="changeMonth('next')">
|
39
|
+
<view class="uni-calendar__header-btn uni-calendar--right"></view>
|
40
|
+
</view>
|
41
|
+
|
42
|
+
<view v-if="!insert" class="dialog-close" @click="maskClick">
|
43
|
+
<view class="dialog-close-plus" data-id="close"></view>
|
44
|
+
<view
|
45
|
+
class="dialog-close-plus dialog-close-rotate"
|
46
|
+
data-id="close"></view>
|
47
|
+
</view>
|
48
|
+
</view>
|
49
|
+
<view class="uni-calendar__box">
|
50
|
+
<view v-if="showMonth" class="uni-calendar__box-bg">
|
51
|
+
<text class="uni-calendar__box-bg-text">{{ nowDate.month }}</text>
|
52
|
+
</view>
|
53
|
+
|
54
|
+
<view class="uni-calendar__weeks" style="padding-bottom: 7px">
|
55
|
+
<view class="uni-calendar__weeks-day">
|
56
|
+
<text class="uni-calendar__weeks-day-text">{{ SUNText }}</text>
|
57
|
+
</view>
|
58
|
+
<view class="uni-calendar__weeks-day">
|
59
|
+
<text class="uni-calendar__weeks-day-text">{{ MONText }}</text>
|
60
|
+
</view>
|
61
|
+
<view class="uni-calendar__weeks-day">
|
62
|
+
<text class="uni-calendar__weeks-day-text">{{ TUEText }}</text>
|
63
|
+
</view>
|
64
|
+
<view class="uni-calendar__weeks-day">
|
65
|
+
<text class="uni-calendar__weeks-day-text">{{ WEDText }}</text>
|
66
|
+
</view>
|
67
|
+
<view class="uni-calendar__weeks-day">
|
68
|
+
<text class="uni-calendar__weeks-day-text">{{ THUText }}</text>
|
69
|
+
</view>
|
70
|
+
<view class="uni-calendar__weeks-day">
|
71
|
+
<text class="uni-calendar__weeks-day-text">{{ FRIText }}</text>
|
72
|
+
</view>
|
73
|
+
<view class="uni-calendar__weeks-day">
|
74
|
+
<text class="uni-calendar__weeks-day-text">{{ SATText }}</text>
|
75
|
+
</view>
|
76
|
+
</view>
|
77
|
+
|
78
|
+
<view
|
79
|
+
class="uni-calendar__weeks"
|
80
|
+
v-for="(item, weekIndex) in weeks"
|
81
|
+
:key="weekIndex">
|
82
|
+
<view
|
83
|
+
class="uni-calendar__weeks-item"
|
84
|
+
v-for="(weeks, weeksIndex) in item"
|
85
|
+
:key="weeksIndex">
|
86
|
+
<calendar-item
|
87
|
+
class="uni-calendar-item--hook"
|
88
|
+
:weeks="weeks"
|
89
|
+
:calendar="calendar"
|
90
|
+
:selected="selected"
|
91
|
+
:checkHover="range"
|
92
|
+
@change="choiceDate"
|
93
|
+
@handleMouse="handleMouse">
|
94
|
+
</calendar-item>
|
95
|
+
</view>
|
96
|
+
</view>
|
97
|
+
</view>
|
98
|
+
|
99
|
+
<view
|
100
|
+
v-if="!insert && !range && hasTime"
|
101
|
+
class="uni-date-changed uni-calendar--fixed-top"
|
102
|
+
style="padding: 0 80px">
|
103
|
+
<view class="uni-date-changed--time-date">{{
|
104
|
+
tempSingleDate ? tempSingleDate : selectDateText
|
105
|
+
}}</view>
|
106
|
+
<time-picker
|
107
|
+
type="time"
|
108
|
+
:start="timepickerStartTime"
|
109
|
+
:end="timepickerEndTime"
|
110
|
+
v-model="time"
|
111
|
+
:disabled="!tempSingleDate"
|
112
|
+
:border="false"
|
113
|
+
:hide-second="hideSecond"
|
114
|
+
class="time-picker-style">
|
115
|
+
</time-picker>
|
116
|
+
</view>
|
117
|
+
|
118
|
+
<view
|
119
|
+
v-if="!insert && range && hasTime"
|
120
|
+
class="uni-date-changed uni-calendar--fixed-top">
|
121
|
+
<view class="uni-date-changed--time-start">
|
122
|
+
<view class="uni-date-changed--time-date"
|
123
|
+
>{{ tempRange.before ? tempRange.before : startDateText }}
|
124
|
+
</view>
|
125
|
+
<time-picker
|
126
|
+
type="time"
|
127
|
+
:start="timepickerStartTime"
|
128
|
+
v-model="timeRange.startTime"
|
129
|
+
:border="false"
|
130
|
+
:hide-second="hideSecond"
|
131
|
+
:disabled="!tempRange.before"
|
132
|
+
class="time-picker-style">
|
133
|
+
</time-picker>
|
134
|
+
</view>
|
135
|
+
<view style="line-height: 50px">
|
136
|
+
<uni-icons type="arrowthinright" color="#999"></uni-icons>
|
137
|
+
</view>
|
138
|
+
<view class="uni-date-changed--time-end">
|
139
|
+
<view class="uni-date-changed--time-date">{{
|
140
|
+
tempRange.after ? tempRange.after : endDateText
|
141
|
+
}}</view>
|
142
|
+
<time-picker
|
143
|
+
type="time"
|
144
|
+
:end="timepickerEndTime"
|
145
|
+
v-model="timeRange.endTime"
|
146
|
+
:border="false"
|
147
|
+
:hide-second="hideSecond"
|
148
|
+
:disabled="!tempRange.after"
|
149
|
+
class="time-picker-style">
|
150
|
+
</time-picker>
|
151
|
+
</view>
|
152
|
+
</view>
|
153
|
+
|
154
|
+
<view v-if="!insert" class="uni-date-changed uni-date-btn--ok">
|
155
|
+
<view class="uni-datetime-picker--btn" @click="confirm">{{
|
156
|
+
confirmText
|
157
|
+
}}</view>
|
158
|
+
</view>
|
159
|
+
</view>
|
160
|
+
</view>
|
100
161
|
</template>
|
101
162
|
|
102
163
|
<script>
|
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
|
-
let newDate
|
618
|
-
if (type === 'pre') {
|
619
|
-
newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate
|
620
|
-
} else if (type === 'next') {
|
621
|
-
newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate
|
622
|
-
}
|
623
|
-
|
624
|
-
this.setDate(newDate)
|
625
|
-
this.monthSwitch()
|
626
|
-
},
|
627
|
-
/**
|
628
|
-
* 设置日期
|
629
|
-
* @param {Object} date
|
630
|
-
*/
|
631
|
-
setDate(date) {
|
632
|
-
this.cale.setDate(date)
|
633
|
-
this.weeks = this.cale.weeks
|
634
|
-
this.nowDate = this.cale.getInfo(date)
|
635
|
-
}
|
636
|
-
}
|
637
|
-
}
|
164
|
+
import { Calendar, getDate, getTime } from './util.js';
|
165
|
+
import calendarItem from './calendar-item.vue';
|
166
|
+
import timePicker from './time-picker.vue';
|
167
|
+
|
168
|
+
import { initVueI18n } from '@dcloudio/uni-i18n';
|
169
|
+
import i18nMessages from './i18n/index.js';
|
170
|
+
const { t } = initVueI18n(i18nMessages);
|
171
|
+
|
172
|
+
/**
|
173
|
+
* Calendar 日历
|
174
|
+
* @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
|
175
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=56
|
176
|
+
* @property {String} date 自定义当前时间,默认为今天
|
177
|
+
* @property {String} startDate 日期选择范围-开始日期
|
178
|
+
* @property {String} endDate 日期选择范围-结束日期
|
179
|
+
* @property {Boolean} range 范围选择
|
180
|
+
* @property {Boolean} insert = [true|false] 插入模式,默认为false
|
181
|
+
* @value true 弹窗模式
|
182
|
+
* @value false 插入模式
|
183
|
+
* @property {Boolean} clearDate = [true|false] 弹窗模式是否清空上次选择内容
|
184
|
+
* @property {Array} selected 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]
|
185
|
+
* @property {Boolean} showMonth 是否选择月份为背景
|
186
|
+
* @property {[String} defaultValue 选择器打开时默认显示的时间
|
187
|
+
* @event {Function} change 日期改变,`insert :ture` 时生效
|
188
|
+
* @event {Function} confirm 确认选择`insert :false` 时生效
|
189
|
+
* @event {Function} monthSwitch 切换月份时触发
|
190
|
+
* @example <uni-calendar :insert="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" />
|
191
|
+
*/
|
192
|
+
export default {
|
193
|
+
components: {
|
194
|
+
calendarItem,
|
195
|
+
timePicker
|
196
|
+
},
|
197
|
+
|
198
|
+
options: {
|
199
|
+
// #ifdef MP-TOUTIAO
|
200
|
+
// virtualHost: false,
|
201
|
+
// #endif
|
202
|
+
// #ifndef MP-TOUTIAO
|
203
|
+
virtualHost: true
|
204
|
+
// #endif
|
205
|
+
},
|
206
|
+
props: {
|
207
|
+
date: {
|
208
|
+
type: String,
|
209
|
+
default: ''
|
210
|
+
},
|
211
|
+
defTime: {
|
212
|
+
type: [String, Object],
|
213
|
+
default: ''
|
214
|
+
},
|
215
|
+
selectableTimes: {
|
216
|
+
type: [Object],
|
217
|
+
default() {
|
218
|
+
return {};
|
219
|
+
}
|
220
|
+
},
|
221
|
+
selected: {
|
222
|
+
type: Array,
|
223
|
+
default() {
|
224
|
+
return [];
|
225
|
+
}
|
226
|
+
},
|
227
|
+
startDate: {
|
228
|
+
type: String,
|
229
|
+
default: ''
|
230
|
+
},
|
231
|
+
endDate: {
|
232
|
+
type: String,
|
233
|
+
default: ''
|
234
|
+
},
|
235
|
+
startPlaceholder: {
|
236
|
+
type: String,
|
237
|
+
default: ''
|
238
|
+
},
|
239
|
+
endPlaceholder: {
|
240
|
+
type: String,
|
241
|
+
default: ''
|
242
|
+
},
|
243
|
+
range: {
|
244
|
+
type: Boolean,
|
245
|
+
default: false
|
246
|
+
},
|
247
|
+
hasTime: {
|
248
|
+
type: Boolean,
|
249
|
+
default: false
|
250
|
+
},
|
251
|
+
insert: {
|
252
|
+
type: Boolean,
|
253
|
+
default: true
|
254
|
+
},
|
255
|
+
showMonth: {
|
256
|
+
type: Boolean,
|
257
|
+
default: true
|
258
|
+
},
|
259
|
+
clearDate: {
|
260
|
+
type: Boolean,
|
261
|
+
default: true
|
262
|
+
},
|
263
|
+
checkHover: {
|
264
|
+
type: Boolean,
|
265
|
+
default: true
|
266
|
+
},
|
267
|
+
hideSecond: {
|
268
|
+
type: [Boolean],
|
269
|
+
default: false
|
270
|
+
},
|
271
|
+
pleStatus: {
|
272
|
+
type: Object,
|
273
|
+
default() {
|
274
|
+
return {
|
275
|
+
before: '',
|
276
|
+
after: '',
|
277
|
+
data: [],
|
278
|
+
fulldate: ''
|
279
|
+
};
|
280
|
+
}
|
281
|
+
},
|
282
|
+
defaultValue: {
|
283
|
+
type: [String, Object, Array],
|
284
|
+
default: ''
|
285
|
+
}
|
286
|
+
},
|
287
|
+
data() {
|
288
|
+
return {
|
289
|
+
show: false,
|
290
|
+
weeks: [],
|
291
|
+
calendar: {},
|
292
|
+
nowDate: {},
|
293
|
+
aniMaskShow: false,
|
294
|
+
firstEnter: true,
|
295
|
+
time: '',
|
296
|
+
timeRange: {
|
297
|
+
startTime: '',
|
298
|
+
endTime: ''
|
299
|
+
},
|
300
|
+
tempSingleDate: '',
|
301
|
+
tempRange: {
|
302
|
+
before: '',
|
303
|
+
after: ''
|
304
|
+
}
|
305
|
+
};
|
306
|
+
},
|
307
|
+
watch: {
|
308
|
+
date: {
|
309
|
+
immediate: true,
|
310
|
+
handler(newVal) {
|
311
|
+
if (!this.range) {
|
312
|
+
this.tempSingleDate = newVal;
|
313
|
+
setTimeout(() => {
|
314
|
+
this.init(newVal);
|
315
|
+
}, 100);
|
316
|
+
}
|
317
|
+
}
|
318
|
+
},
|
319
|
+
defTime: {
|
320
|
+
immediate: true,
|
321
|
+
handler(newVal) {
|
322
|
+
if (!this.range) {
|
323
|
+
this.time = newVal;
|
324
|
+
} else {
|
325
|
+
this.timeRange.startTime = newVal.start;
|
326
|
+
this.timeRange.endTime = newVal.end;
|
327
|
+
}
|
328
|
+
}
|
329
|
+
},
|
330
|
+
startDate(val) {
|
331
|
+
// 字节小程序 watch 早于 created
|
332
|
+
if (!this.cale) {
|
333
|
+
return;
|
334
|
+
}
|
335
|
+
this.cale.setStartDate(val);
|
336
|
+
this.cale.setDate(this.nowDate.fullDate);
|
337
|
+
this.weeks = this.cale.weeks;
|
338
|
+
},
|
339
|
+
endDate(val) {
|
340
|
+
// 字节小程序 watch 早于 created
|
341
|
+
if (!this.cale) {
|
342
|
+
return;
|
343
|
+
}
|
344
|
+
this.cale.setEndDate(val);
|
345
|
+
this.cale.setDate(this.nowDate.fullDate);
|
346
|
+
this.weeks = this.cale.weeks;
|
347
|
+
},
|
348
|
+
selected(newVal) {
|
349
|
+
// 字节小程序 watch 早于 created
|
350
|
+
if (!this.cale) {
|
351
|
+
return;
|
352
|
+
}
|
353
|
+
this.cale.setSelectInfo(this.nowDate.fullDate, newVal);
|
354
|
+
this.weeks = this.cale.weeks;
|
355
|
+
},
|
356
|
+
pleStatus: {
|
357
|
+
immediate: true,
|
358
|
+
handler(newVal) {
|
359
|
+
const { before, after, fulldate, which } = newVal;
|
360
|
+
this.tempRange.before = before;
|
361
|
+
this.tempRange.after = after;
|
362
|
+
setTimeout(() => {
|
363
|
+
if (fulldate) {
|
364
|
+
this.cale.setHoverMultiple(fulldate);
|
365
|
+
if (before && after) {
|
366
|
+
this.cale.lastHover = true;
|
367
|
+
if (this.rangeWithinMonth(after, before)) return;
|
368
|
+
this.setDate(before);
|
369
|
+
} else {
|
370
|
+
this.cale.setMultiple(fulldate);
|
371
|
+
this.setDate(this.nowDate.fullDate);
|
372
|
+
this.calendar.fullDate = '';
|
373
|
+
this.cale.lastHover = false;
|
374
|
+
}
|
375
|
+
} else {
|
376
|
+
// 字节小程序 watch 早于 created
|
377
|
+
if (!this.cale) {
|
378
|
+
return;
|
379
|
+
}
|
380
|
+
|
381
|
+
this.cale.setDefaultMultiple(before, after);
|
382
|
+
if (which === 'left' && before) {
|
383
|
+
this.setDate(before);
|
384
|
+
this.weeks = this.cale.weeks;
|
385
|
+
} else if (after) {
|
386
|
+
this.setDate(after);
|
387
|
+
this.weeks = this.cale.weeks;
|
388
|
+
}
|
389
|
+
this.cale.lastHover = true;
|
390
|
+
}
|
391
|
+
}, 16);
|
392
|
+
}
|
393
|
+
}
|
394
|
+
},
|
395
|
+
computed: {
|
396
|
+
timepickerStartTime() {
|
397
|
+
const activeDate = this.range
|
398
|
+
? this.tempRange.before
|
399
|
+
: this.calendar.fullDate;
|
400
|
+
return activeDate === this.startDate ? this.selectableTimes.start : '';
|
401
|
+
},
|
402
|
+
timepickerEndTime() {
|
403
|
+
const activeDate = this.range
|
404
|
+
? this.tempRange.after
|
405
|
+
: this.calendar.fullDate;
|
406
|
+
return activeDate === this.endDate ? this.selectableTimes.end : '';
|
407
|
+
},
|
408
|
+
/**
|
409
|
+
* for i18n
|
410
|
+
*/
|
411
|
+
selectDateText() {
|
412
|
+
return t('uni-datetime-picker.selectDate');
|
413
|
+
},
|
414
|
+
startDateText() {
|
415
|
+
return this.startPlaceholder || t('uni-datetime-picker.startDate');
|
416
|
+
},
|
417
|
+
endDateText() {
|
418
|
+
return this.endPlaceholder || t('uni-datetime-picker.endDate');
|
419
|
+
},
|
420
|
+
okText() {
|
421
|
+
return t('uni-datetime-picker.ok');
|
422
|
+
},
|
423
|
+
yearText() {
|
424
|
+
return t('uni-datetime-picker.year');
|
425
|
+
},
|
426
|
+
monthText() {
|
427
|
+
return t('uni-datetime-picker.month');
|
428
|
+
},
|
429
|
+
MONText() {
|
430
|
+
return t('uni-calender.MON');
|
431
|
+
},
|
432
|
+
TUEText() {
|
433
|
+
return t('uni-calender.TUE');
|
434
|
+
},
|
435
|
+
WEDText() {
|
436
|
+
return t('uni-calender.WED');
|
437
|
+
},
|
438
|
+
THUText() {
|
439
|
+
return t('uni-calender.THU');
|
440
|
+
},
|
441
|
+
FRIText() {
|
442
|
+
return t('uni-calender.FRI');
|
443
|
+
},
|
444
|
+
SATText() {
|
445
|
+
return t('uni-calender.SAT');
|
446
|
+
},
|
447
|
+
SUNText() {
|
448
|
+
return t('uni-calender.SUN');
|
449
|
+
},
|
450
|
+
confirmText() {
|
451
|
+
return t('uni-calender.confirm');
|
452
|
+
}
|
453
|
+
},
|
454
|
+
created() {
|
455
|
+
// 获取日历方法实例
|
456
|
+
this.cale = new Calendar({
|
457
|
+
selected: this.selected,
|
458
|
+
startDate: this.startDate,
|
459
|
+
endDate: this.endDate,
|
460
|
+
range: this.range
|
461
|
+
});
|
462
|
+
// 选中某一天
|
463
|
+
this.init(this.date);
|
464
|
+
},
|
465
|
+
methods: {
|
466
|
+
leaveCale() {
|
467
|
+
this.firstEnter = true;
|
468
|
+
},
|
469
|
+
handleMouse(weeks) {
|
470
|
+
if (weeks.disable) return;
|
471
|
+
if (this.cale.lastHover) return;
|
472
|
+
let { before, after } = this.cale.multipleStatus;
|
473
|
+
if (!before) return;
|
474
|
+
this.calendar = weeks;
|
475
|
+
// 设置范围选
|
476
|
+
this.cale.setHoverMultiple(this.calendar.fullDate);
|
477
|
+
this.weeks = this.cale.weeks;
|
478
|
+
// hover时,进入一个日历,更新另一个
|
479
|
+
if (this.firstEnter) {
|
480
|
+
this.$emit('firstEnterCale', this.cale.multipleStatus);
|
481
|
+
this.firstEnter = false;
|
482
|
+
}
|
483
|
+
},
|
484
|
+
rangeWithinMonth(A, B) {
|
485
|
+
const [yearA, monthA] = A.split('-');
|
486
|
+
const [yearB, monthB] = B.split('-');
|
487
|
+
return yearA === yearB && monthA === monthB;
|
488
|
+
},
|
489
|
+
// 蒙版点击事件
|
490
|
+
maskClick() {
|
491
|
+
this.close();
|
492
|
+
this.$emit('maskClose');
|
493
|
+
},
|
494
|
+
|
495
|
+
clearCalender() {
|
496
|
+
if (this.range) {
|
497
|
+
this.timeRange.startTime = '';
|
498
|
+
this.timeRange.endTime = '';
|
499
|
+
this.tempRange.before = '';
|
500
|
+
this.tempRange.after = '';
|
501
|
+
this.cale.multipleStatus.before = '';
|
502
|
+
this.cale.multipleStatus.after = '';
|
503
|
+
this.cale.multipleStatus.data = [];
|
504
|
+
this.cale.lastHover = false;
|
505
|
+
} else {
|
506
|
+
this.time = '';
|
507
|
+
this.tempSingleDate = '';
|
508
|
+
}
|
509
|
+
this.calendar.fullDate = '';
|
510
|
+
this.setDate(new Date());
|
511
|
+
},
|
512
|
+
|
513
|
+
bindDateChange(e) {
|
514
|
+
const value = e.detail.value + '-1';
|
515
|
+
this.setDate(value);
|
516
|
+
},
|
517
|
+
/**
|
518
|
+
* 初始化日期显示
|
519
|
+
* @param {Object} date
|
520
|
+
*/
|
521
|
+
init(date) {
|
522
|
+
// 字节小程序 watch 早于 created
|
523
|
+
if (!this.cale) {
|
524
|
+
return;
|
525
|
+
}
|
526
|
+
this.cale.setDate(date || new Date());
|
527
|
+
this.weeks = this.cale.weeks;
|
528
|
+
this.nowDate = this.cale.getInfo(date);
|
529
|
+
this.calendar = {
|
530
|
+
...this.nowDate
|
531
|
+
};
|
532
|
+
if (!date) {
|
533
|
+
// 优化date为空默认不选中今天
|
534
|
+
this.calendar.fullDate = '';
|
535
|
+
if (this.defaultValue && !this.range) {
|
536
|
+
// 暂时只支持移动端非范围选择
|
537
|
+
const defaultDate = new Date(this.defaultValue);
|
538
|
+
const fullDate = getDate(defaultDate);
|
539
|
+
const year = defaultDate.getFullYear();
|
540
|
+
const month = defaultDate.getMonth() + 1;
|
541
|
+
const date = defaultDate.getDate();
|
542
|
+
const day = defaultDate.getDay();
|
543
|
+
(this.calendar = {
|
544
|
+
fullDate,
|
545
|
+
year,
|
546
|
+
month,
|
547
|
+
date,
|
548
|
+
day
|
549
|
+
}),
|
550
|
+
(this.tempSingleDate = fullDate);
|
551
|
+
this.time = getTime(defaultDate, this.hideSecond);
|
552
|
+
}
|
553
|
+
}
|
554
|
+
},
|
555
|
+
/**
|
556
|
+
* 打开日历弹窗
|
557
|
+
*/
|
558
|
+
open() {
|
559
|
+
// 弹窗模式并且清理数据
|
560
|
+
if (this.clearDate && !this.insert) {
|
561
|
+
this.cale.cleanMultipleStatus();
|
562
|
+
this.init(this.date);
|
563
|
+
}
|
564
|
+
this.show = true;
|
565
|
+
this.$nextTick(() => {
|
566
|
+
setTimeout(() => {
|
567
|
+
this.aniMaskShow = true;
|
568
|
+
}, 50);
|
569
|
+
});
|
570
|
+
},
|
571
|
+
/**
|
572
|
+
* 关闭日历弹窗
|
573
|
+
*/
|
574
|
+
close() {
|
575
|
+
this.aniMaskShow = false;
|
576
|
+
this.$nextTick(() => {
|
577
|
+
setTimeout(() => {
|
578
|
+
this.show = false;
|
579
|
+
this.$emit('close');
|
580
|
+
}, 300);
|
581
|
+
});
|
582
|
+
},
|
583
|
+
/**
|
584
|
+
* 确认按钮
|
585
|
+
*/
|
586
|
+
confirm() {
|
587
|
+
this.setEmit('confirm');
|
588
|
+
this.close();
|
589
|
+
},
|
590
|
+
/**
|
591
|
+
* 变化触发
|
592
|
+
*/
|
593
|
+
change(isSingleChange) {
|
594
|
+
if (!this.insert && !isSingleChange) return;
|
595
|
+
this.setEmit('change');
|
596
|
+
},
|
597
|
+
/**
|
598
|
+
* 选择月份触发
|
599
|
+
*/
|
600
|
+
monthSwitch() {
|
601
|
+
let { year, month } = this.nowDate;
|
602
|
+
this.$emit('monthSwitch', {
|
603
|
+
year,
|
604
|
+
month: Number(month)
|
605
|
+
});
|
606
|
+
},
|
607
|
+
/**
|
608
|
+
* 派发事件
|
609
|
+
* @param {Object} name
|
610
|
+
*/
|
611
|
+
setEmit(name) {
|
612
|
+
if (!this.range) {
|
613
|
+
if (!this.calendar.fullDate) {
|
614
|
+
this.calendar = this.cale.getInfo(new Date());
|
615
|
+
this.tempSingleDate = this.calendar.fullDate;
|
616
|
+
}
|
617
|
+
if (this.hasTime && !this.time) {
|
618
|
+
this.time = getTime(new Date(), this.hideSecond);
|
619
|
+
}
|
620
|
+
}
|
621
|
+
let { year, month, date, fullDate, extraInfo } = this.calendar;
|
622
|
+
this.$emit(name, {
|
623
|
+
range: this.cale.multipleStatus,
|
624
|
+
year,
|
625
|
+
month,
|
626
|
+
date,
|
627
|
+
time: this.time,
|
628
|
+
timeRange: this.timeRange,
|
629
|
+
fulldate: fullDate,
|
630
|
+
extraInfo: extraInfo || {}
|
631
|
+
});
|
632
|
+
},
|
633
|
+
/**
|
634
|
+
* 选择天触发
|
635
|
+
* @param {Object} weeks
|
636
|
+
*/
|
637
|
+
choiceDate(weeks) {
|
638
|
+
if (weeks.disable) return;
|
639
|
+
this.calendar = weeks;
|
640
|
+
this.calendar.userChecked = true;
|
641
|
+
// 设置多选
|
642
|
+
this.cale.setMultiple(this.calendar.fullDate, true);
|
643
|
+
this.weeks = this.cale.weeks;
|
644
|
+
this.tempSingleDate = this.calendar.fullDate;
|
645
|
+
const beforeDate = new Date(this.cale.multipleStatus.before).getTime();
|
646
|
+
const afterDate = new Date(this.cale.multipleStatus.after).getTime();
|
647
|
+
if (beforeDate > afterDate && afterDate) {
|
648
|
+
this.tempRange.before = this.cale.multipleStatus.after;
|
649
|
+
this.tempRange.after = this.cale.multipleStatus.before;
|
650
|
+
} else {
|
651
|
+
this.tempRange.before = this.cale.multipleStatus.before;
|
652
|
+
this.tempRange.after = this.cale.multipleStatus.after;
|
653
|
+
}
|
654
|
+
this.change(true);
|
655
|
+
},
|
656
|
+
changeMonth(type) {
|
657
|
+
let newDate;
|
658
|
+
if (type === 'pre') {
|
659
|
+
newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate;
|
660
|
+
} else if (type === 'next') {
|
661
|
+
newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate;
|
662
|
+
}
|
663
|
+
|
664
|
+
this.setDate(newDate);
|
665
|
+
this.monthSwitch();
|
666
|
+
},
|
667
|
+
/**
|
668
|
+
* 设置日期
|
669
|
+
* @param {Object} date
|
670
|
+
*/
|
671
|
+
setDate(date) {
|
672
|
+
this.cale.setDate(date);
|
673
|
+
this.weeks = this.cale.weeks;
|
674
|
+
this.nowDate = this.cale.getInfo(date);
|
675
|
+
}
|
676
|
+
}
|
677
|
+
};
|
638
678
|
</script>
|
639
679
|
|
640
680
|
<style lang="scss">
|
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
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
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
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
/* #endif */
|
681
|
+
$uni-primary: #007aff !default;
|
682
|
+
|
683
|
+
.uni-calendar {
|
684
|
+
/* #ifndef APP-NVUE */
|
685
|
+
display: flex;
|
686
|
+
/* #endif */
|
687
|
+
flex-direction: column;
|
688
|
+
}
|
689
|
+
|
690
|
+
.uni-calendar__mask {
|
691
|
+
position: fixed;
|
692
|
+
bottom: 0;
|
693
|
+
top: 0;
|
694
|
+
left: 0;
|
695
|
+
right: 0;
|
696
|
+
background-color: rgba(0, 0, 0, 0.4);
|
697
|
+
transition-property: opacity;
|
698
|
+
transition-duration: 0.3s;
|
699
|
+
opacity: 0;
|
700
|
+
/* #ifndef APP-NVUE */
|
701
|
+
z-index: 99;
|
702
|
+
/* #endif */
|
703
|
+
}
|
704
|
+
|
705
|
+
.uni-calendar--mask-show {
|
706
|
+
opacity: 1;
|
707
|
+
}
|
708
|
+
|
709
|
+
.uni-calendar--fixed {
|
710
|
+
position: fixed;
|
711
|
+
bottom: calc(var(--window-bottom));
|
712
|
+
left: 0;
|
713
|
+
right: 0;
|
714
|
+
transition-property: transform;
|
715
|
+
transition-duration: 0.3s;
|
716
|
+
transform: translateY(460px);
|
717
|
+
/* #ifndef APP-NVUE */
|
718
|
+
z-index: 99;
|
719
|
+
/* #endif */
|
720
|
+
}
|
721
|
+
|
722
|
+
.uni-calendar--ani-show {
|
723
|
+
transform: translateY(0);
|
724
|
+
}
|
725
|
+
|
726
|
+
.uni-calendar__content {
|
727
|
+
background-color: #fff;
|
728
|
+
}
|
729
|
+
|
730
|
+
.uni-calendar__content-mobile {
|
731
|
+
border-top-left-radius: 10px;
|
732
|
+
border-top-right-radius: 10px;
|
733
|
+
box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, 0.1);
|
734
|
+
}
|
735
|
+
|
736
|
+
.uni-calendar__header {
|
737
|
+
position: relative;
|
738
|
+
/* #ifndef APP-NVUE */
|
739
|
+
display: flex;
|
740
|
+
/* #endif */
|
741
|
+
flex-direction: row;
|
742
|
+
justify-content: center;
|
743
|
+
align-items: center;
|
744
|
+
height: 50px;
|
745
|
+
}
|
746
|
+
|
747
|
+
.uni-calendar__header-mobile {
|
748
|
+
padding: 10px;
|
749
|
+
padding-bottom: 0;
|
750
|
+
}
|
751
|
+
|
752
|
+
.uni-calendar--fixed-top {
|
753
|
+
/* #ifndef APP-NVUE */
|
754
|
+
display: flex;
|
755
|
+
/* #endif */
|
756
|
+
flex-direction: row;
|
757
|
+
justify-content: space-between;
|
758
|
+
border-top-color: rgba(0, 0, 0, 0.4);
|
759
|
+
border-top-style: solid;
|
760
|
+
border-top-width: 1px;
|
761
|
+
}
|
762
|
+
|
763
|
+
.uni-calendar--fixed-width {
|
764
|
+
width: 50px;
|
765
|
+
}
|
766
|
+
|
767
|
+
.uni-calendar__backtoday {
|
768
|
+
position: absolute;
|
769
|
+
right: 0;
|
770
|
+
top: 25rpx;
|
771
|
+
padding: 0 5px;
|
772
|
+
padding-left: 10px;
|
773
|
+
height: 25px;
|
774
|
+
line-height: 25px;
|
775
|
+
font-size: 12px;
|
776
|
+
border-top-left-radius: 25px;
|
777
|
+
border-bottom-left-radius: 25px;
|
778
|
+
color: #fff;
|
779
|
+
background-color: #f1f1f1;
|
780
|
+
}
|
781
|
+
|
782
|
+
.uni-calendar__header-text {
|
783
|
+
text-align: center;
|
784
|
+
width: 100px;
|
785
|
+
font-size: 15px;
|
786
|
+
color: #666;
|
787
|
+
}
|
788
|
+
|
789
|
+
.uni-calendar__button-text {
|
790
|
+
text-align: center;
|
791
|
+
width: 100px;
|
792
|
+
font-size: 14px;
|
793
|
+
color: $uni-primary;
|
794
|
+
/* #ifndef APP-NVUE */
|
795
|
+
letter-spacing: 3px;
|
796
|
+
/* #endif */
|
797
|
+
}
|
798
|
+
|
799
|
+
.uni-calendar__header-btn-box {
|
800
|
+
/* #ifndef APP-NVUE */
|
801
|
+
display: flex;
|
802
|
+
/* #endif */
|
803
|
+
flex-direction: row;
|
804
|
+
align-items: center;
|
805
|
+
justify-content: center;
|
806
|
+
width: 50px;
|
807
|
+
height: 50px;
|
808
|
+
}
|
809
|
+
|
810
|
+
.uni-calendar__header-btn {
|
811
|
+
width: 9px;
|
812
|
+
height: 9px;
|
813
|
+
border-left-color: #808080;
|
814
|
+
border-left-style: solid;
|
815
|
+
border-left-width: 1px;
|
816
|
+
border-top-color: #555555;
|
817
|
+
border-top-style: solid;
|
818
|
+
border-top-width: 1px;
|
819
|
+
}
|
820
|
+
|
821
|
+
.uni-calendar--left {
|
822
|
+
transform: rotate(-45deg);
|
823
|
+
}
|
824
|
+
|
825
|
+
.uni-calendar--right {
|
826
|
+
transform: rotate(135deg);
|
827
|
+
}
|
828
|
+
|
829
|
+
.uni-calendar__weeks {
|
830
|
+
position: relative;
|
831
|
+
/* #ifndef APP-NVUE */
|
832
|
+
display: flex;
|
833
|
+
/* #endif */
|
834
|
+
flex-direction: row;
|
835
|
+
}
|
836
|
+
|
837
|
+
.uni-calendar__weeks-item {
|
838
|
+
flex: 1;
|
839
|
+
}
|
840
|
+
|
841
|
+
.uni-calendar__weeks-day {
|
842
|
+
flex: 1;
|
843
|
+
/* #ifndef APP-NVUE */
|
844
|
+
display: flex;
|
845
|
+
/* #endif */
|
846
|
+
flex-direction: column;
|
847
|
+
justify-content: center;
|
848
|
+
align-items: center;
|
849
|
+
height: 40px;
|
850
|
+
border-bottom-color: #f5f5f5;
|
851
|
+
border-bottom-style: solid;
|
852
|
+
border-bottom-width: 1px;
|
853
|
+
}
|
854
|
+
|
855
|
+
.uni-calendar__weeks-day-text {
|
856
|
+
font-size: 12px;
|
857
|
+
color: #b2b2b2;
|
858
|
+
}
|
859
|
+
|
860
|
+
.uni-calendar__box {
|
861
|
+
position: relative;
|
862
|
+
// padding: 0 10px;
|
863
|
+
padding-bottom: 7px;
|
864
|
+
}
|
865
|
+
|
866
|
+
.uni-calendar__box-bg {
|
867
|
+
/* #ifndef APP-NVUE */
|
868
|
+
display: flex;
|
869
|
+
/* #endif */
|
870
|
+
justify-content: center;
|
871
|
+
align-items: center;
|
872
|
+
position: absolute;
|
873
|
+
top: 0;
|
874
|
+
left: 0;
|
875
|
+
right: 0;
|
876
|
+
bottom: 0;
|
877
|
+
}
|
878
|
+
|
879
|
+
.uni-calendar__box-bg-text {
|
880
|
+
font-size: 200px;
|
881
|
+
font-weight: bold;
|
882
|
+
color: #999;
|
883
|
+
opacity: 0.1;
|
884
|
+
text-align: center;
|
885
|
+
/* #ifndef APP-NVUE */
|
886
|
+
line-height: 1;
|
887
|
+
/* #endif */
|
888
|
+
}
|
889
|
+
|
890
|
+
.uni-date-changed {
|
891
|
+
padding: 0 10px;
|
892
|
+
// line-height: 50px;
|
893
|
+
text-align: center;
|
894
|
+
color: #333;
|
895
|
+
border-top-color: #dcdcdc;
|
896
|
+
border-top-style: solid;
|
897
|
+
border-top-width: 1px;
|
898
|
+
flex: 1;
|
899
|
+
}
|
900
|
+
|
901
|
+
.uni-date-btn--ok {
|
902
|
+
padding: 20px 15px;
|
903
|
+
}
|
904
|
+
|
905
|
+
.uni-date-changed--time-start {
|
906
|
+
/* #ifndef APP-NVUE */
|
907
|
+
display: flex;
|
908
|
+
/* #endif */
|
909
|
+
align-items: center;
|
910
|
+
}
|
911
|
+
|
912
|
+
.uni-date-changed--time-end {
|
913
|
+
/* #ifndef APP-NVUE */
|
914
|
+
display: flex;
|
915
|
+
/* #endif */
|
916
|
+
align-items: center;
|
917
|
+
}
|
918
|
+
|
919
|
+
.uni-date-changed--time-date {
|
920
|
+
color: #999;
|
921
|
+
line-height: 50px;
|
922
|
+
/* #ifdef MP-TOUTIAO */
|
923
|
+
// font-size: 16px;
|
924
|
+
/* #endif */
|
925
|
+
margin-right: 5px;
|
926
|
+
// opacity: 0.6;
|
927
|
+
}
|
928
|
+
|
929
|
+
.time-picker-style {
|
930
|
+
// width: 62px;
|
931
|
+
/* #ifndef APP-NVUE */
|
932
|
+
display: flex;
|
933
|
+
/* #endif */
|
934
|
+
justify-content: center;
|
935
|
+
align-items: center;
|
936
|
+
}
|
937
|
+
|
938
|
+
.mr-10 {
|
939
|
+
margin-right: 10px;
|
940
|
+
}
|
941
|
+
|
942
|
+
.dialog-close {
|
943
|
+
position: absolute;
|
944
|
+
top: 0;
|
945
|
+
right: 0;
|
946
|
+
bottom: 0;
|
947
|
+
/* #ifndef APP-NVUE */
|
948
|
+
display: flex;
|
949
|
+
/* #endif */
|
950
|
+
flex-direction: row;
|
951
|
+
align-items: center;
|
952
|
+
padding: 0 25px;
|
953
|
+
margin-top: 10px;
|
954
|
+
}
|
955
|
+
|
956
|
+
.dialog-close-plus {
|
957
|
+
width: 16px;
|
958
|
+
height: 2px;
|
959
|
+
background-color: #737987;
|
960
|
+
border-radius: 2px;
|
961
|
+
transform: rotate(45deg);
|
962
|
+
}
|
963
|
+
|
964
|
+
.dialog-close-rotate {
|
965
|
+
position: absolute;
|
966
|
+
transform: rotate(-45deg);
|
967
|
+
}
|
968
|
+
|
969
|
+
.uni-datetime-picker--btn {
|
970
|
+
border-radius: 100px;
|
971
|
+
height: 40px;
|
972
|
+
line-height: 40px;
|
973
|
+
background-color: $uni-primary;
|
974
|
+
color: #fff;
|
975
|
+
font-size: 16px;
|
976
|
+
letter-spacing: 2px;
|
977
|
+
}
|
978
|
+
|
979
|
+
/* #ifndef APP-NVUE */
|
980
|
+
.uni-datetime-picker--btn:active {
|
981
|
+
opacity: 0.7;
|
982
|
+
}
|
983
|
+
|
984
|
+
/* #endif */
|
947
985
|
</style>
|