uview-plus 3.8.39 → 3.8.49
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/changelog.md +62 -0
- package/components/u-calendar/calendar.js +4 -3
- package/components/u-calendar/props.js +5 -0
- package/components/u-calendar/u-calendar.vue +14 -2
- package/components/u-calendar-strip/calendarStrip.js +36 -0
- package/components/u-calendar-strip/props.js +68 -0
- package/components/u-calendar-strip/u-calendar-strip.vue +507 -0
- package/components/u-datetime-picker/datetimePicker.js +2 -0
- package/components/u-datetime-picker/props.js +15 -5
- package/components/u-datetime-picker/u-datetime-picker.vue +117 -42
- package/components/u-guide/guide.js +16 -0
- package/components/u-guide/props.js +51 -0
- package/components/u-guide/u-guide.vue +259 -0
- package/components/u-number-box/u-number-box.vue +8 -5
- package/components/u-signature/u-signature.vue +11 -0
- package/components/u-tabbar-item/u-tabbar-item.vue +2 -2
- package/components/u-tabs/props.js +11 -6
- package/components/u-tabs/tabs.js +7 -6
- package/components/u-tabs/u-tabs.vue +145 -5
- package/components/u-tooltip/props.js +5 -0
- package/components/u-tooltip/tooltip.js +2 -1
- package/components/u-tooltip/u-tooltip.vue +26 -13
- package/libs/config/props.js +4 -0
- package/package.json +1 -1
- package/types/comps/calendar.d.ts +5 -0
- package/types/comps/calendarStrip.d.ts +116 -0
- package/types/comps/datetimePicker.d.ts +15 -5
- package/types/comps/guide.d.ts +45 -0
- package/types/comps/tabs.d.ts +5 -0
- package/types/comps.d.ts +2 -0
- package/types/index.d.ts +2 -0
|
@@ -364,6 +364,17 @@
|
|
|
364
364
|
|
|
365
365
|
this.canvasInstance.clearCanvas();
|
|
366
366
|
},
|
|
367
|
+
|
|
368
|
+
// 对外暴露的清空方法(供工具栏与ref调用)
|
|
369
|
+
clear() {
|
|
370
|
+
this.pathStack = []
|
|
371
|
+
this.currentPath = []
|
|
372
|
+
this.lastPoint = null
|
|
373
|
+
this.isDrawing = false
|
|
374
|
+
this.isEmpty = true
|
|
375
|
+
this.clearCanvas()
|
|
376
|
+
this.$emit('clear')
|
|
377
|
+
},
|
|
367
378
|
|
|
368
379
|
// 导出签名图片
|
|
369
380
|
async exportSignature() {
|
|
@@ -435,8 +435,8 @@
|
|
|
435
435
|
z-index: 1;
|
|
436
436
|
}
|
|
437
437
|
|
|
438
|
-
.u-tabbar-item__icon--mid-button .u-icon,
|
|
439
|
-
.u-tabbar-item__icon--mid-button .u-badge {
|
|
438
|
+
.u-tabbar-item__icon--mid-button :deep(.u-icon),
|
|
439
|
+
.u-tabbar-item__icon--mid-button :deep(.u-badge) {
|
|
440
440
|
position: relative;
|
|
441
441
|
z-index: 2;
|
|
442
442
|
}
|
|
@@ -63,9 +63,14 @@ export const props = defineMixin({
|
|
|
63
63
|
default: () => defProps.tabs.keyName
|
|
64
64
|
},
|
|
65
65
|
// 左侧图标样式
|
|
66
|
-
iconStyle: {
|
|
67
|
-
type: [String, Object],
|
|
68
|
-
default: () => defProps.tabs.iconStyle
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
iconStyle: {
|
|
67
|
+
type: [String, Object],
|
|
68
|
+
default: () => defProps.tabs.iconStyle
|
|
69
|
+
},
|
|
70
|
+
// 形态模式,可选:capsule/card/pill-arrow/tag
|
|
71
|
+
shapeMode: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: () => defProps.tabs.shapeMode
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="u-tabs" :class="[customClass]">
|
|
2
|
+
<view class="u-tabs" :class="[customClass, shapeModeClass]">
|
|
3
3
|
<view class="u-tabs__wrapper">
|
|
4
4
|
<slot name="left" />
|
|
5
5
|
<view class="u-tabs__wrapper__scroll-view-wrapper">
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
<view class="u-tabs__wrapper__nav__item" v-for="(item, index) in tabList" :key="index"
|
|
10
10
|
@tap="clickHandler(item, index)" @longpress="longPressHandler(item,index)"
|
|
11
11
|
:ref="`u-tabs__wrapper__nav__item-${index}`"
|
|
12
|
-
:style="[
|
|
12
|
+
:style="[itemComputedStyle, {flex: scrollable ? '' : 1}]" :class="[`u-tabs__wrapper__nav__item-${index}`,
|
|
13
|
+
shapeMode && `u-tabs__wrapper__nav__item--${shapeMode}`,
|
|
13
14
|
item.disabled && 'u-tabs__wrapper__nav__item--disabled',
|
|
14
15
|
innerCurrent == index ? 'u-tabs__wrapper__nav__item-active' : '']">
|
|
15
16
|
<slot v-if="$slots.icon" name="icon" :item="item" :keyName="keyName" :index="index" />
|
|
@@ -36,6 +37,12 @@
|
|
|
36
37
|
:numberType="item.badge && item.badge.numberType || propsBadge.numberType"
|
|
37
38
|
:inverted="item.badge && item.badge.inverted || propsBadge.inverted"
|
|
38
39
|
customStyle="margin-left: 4px;"></u-badge>
|
|
40
|
+
<view
|
|
41
|
+
v-if="shapeMode === 'card' && innerCurrent == index && index < tabList.length - 1"
|
|
42
|
+
class="u-tabs__wrapper__nav__item__card-corner"></view>
|
|
43
|
+
<view
|
|
44
|
+
v-if="shapeMode === 'pill-arrow' && innerCurrent == index"
|
|
45
|
+
class="u-tabs__wrapper__nav__item__active-arrow"></view>
|
|
39
46
|
</view>
|
|
40
47
|
<!-- #ifdef APP-NVUE -->
|
|
41
48
|
<view class="u-tabs__wrapper__nav__line" ref="u-tabs__wrapper__nav__line" :style="[{
|
|
@@ -43,6 +50,7 @@
|
|
|
43
50
|
height: addUnit(lineHeight),
|
|
44
51
|
background: lineColor,
|
|
45
52
|
backgroundSize: lineBgSize,
|
|
53
|
+
display: showLine ? 'block' : 'none'
|
|
46
54
|
}]">
|
|
47
55
|
</view>
|
|
48
56
|
<!-- #endif -->
|
|
@@ -55,7 +63,7 @@
|
|
|
55
63
|
height: addUnit(lineHeight),
|
|
56
64
|
background: lineColor,
|
|
57
65
|
backgroundSize: lineBgSize,
|
|
58
|
-
display:
|
|
66
|
+
display: showLine ? 'block': 'none'
|
|
59
67
|
}]">
|
|
60
68
|
</view>
|
|
61
69
|
<!-- #endif -->
|
|
@@ -98,6 +106,7 @@
|
|
|
98
106
|
* @property {String | Number} duration 滑块移动一次所需的时间,单位秒(默认 200 )
|
|
99
107
|
* @property {String | Number} swierWidth swiper的宽度(默认 '750rpx' )
|
|
100
108
|
* @property {String} keyName 从`list`元素对象中读取的键名(默认 'name' )
|
|
109
|
+
* @property {String} shapeMode 标签形态模式,可选capsule/card/pill-arrow/tag(默认 '' )
|
|
101
110
|
* @event {Function(index)} change 标签改变时触发 index: 点击了第几个tab,索引从0开始
|
|
102
111
|
* @event {Function(index)} click 点击标签时触发 index: 点击了第几个tab,索引从0开始
|
|
103
112
|
* @event {Function(index)} longPress 长按标签时触发 index: 点击了第几个tab,索引从0开始
|
|
@@ -151,6 +160,31 @@
|
|
|
151
160
|
}
|
|
152
161
|
},
|
|
153
162
|
computed: {
|
|
163
|
+
shapeModeClass() {
|
|
164
|
+
return this.shapeMode ? `u-tabs--shape-${this.shapeMode}` : ''
|
|
165
|
+
},
|
|
166
|
+
showLine() {
|
|
167
|
+
return this.lineShow && !['capsule', 'pill-arrow', 'tag'].includes(this.shapeMode)
|
|
168
|
+
},
|
|
169
|
+
itemComputedStyle() {
|
|
170
|
+
const style = addStyle(this.itemStyle) || {}
|
|
171
|
+
if (this.upHasProp('itemStyle')) {
|
|
172
|
+
return style
|
|
173
|
+
}
|
|
174
|
+
const defaultModeHeights = {
|
|
175
|
+
capsule: '30px',
|
|
176
|
+
card: '34px',
|
|
177
|
+
'pill-arrow': '32px',
|
|
178
|
+
tag: '28px'
|
|
179
|
+
}
|
|
180
|
+
const height = defaultModeHeights[this.shapeMode]
|
|
181
|
+
if (!height) {
|
|
182
|
+
return style
|
|
183
|
+
}
|
|
184
|
+
return deepMerge(style, {
|
|
185
|
+
height
|
|
186
|
+
})
|
|
187
|
+
},
|
|
154
188
|
textStyle() {
|
|
155
189
|
return index => {
|
|
156
190
|
const style = {}
|
|
@@ -165,10 +199,14 @@
|
|
|
165
199
|
|| (customeStyle && customeStyle.color && customeStyle.color !== defaultActiveColor)
|
|
166
200
|
const isInactiveStyleOverridden = this.upHasProp('inactiveStyle')
|
|
167
201
|
|| (customeStyle && customeStyle.color && customeStyle.color !== defaultInactiveColor)
|
|
168
|
-
if (isActive && !isActiveStyleOverridden) {
|
|
202
|
+
if (isActive && ['pill-arrow', 'tag'].includes(this.shapeMode) && !isActiveStyleOverridden) {
|
|
203
|
+
style.color = '#ffffff'
|
|
204
|
+
} else if (isActive && !isActiveStyleOverridden) {
|
|
169
205
|
style.color = this.upThemeVar('--up-main-color', this.$u.color.mainColor || defaultActiveColor)
|
|
170
206
|
}
|
|
171
|
-
if (!isActive && !isInactiveStyleOverridden) {
|
|
207
|
+
if (!isActive && ['pill-arrow', 'tag'].includes(this.shapeMode) && !isInactiveStyleOverridden) {
|
|
208
|
+
style.color = '#606266'
|
|
209
|
+
} else if (!isActive && !isInactiveStyleOverridden) {
|
|
172
210
|
style.color = this.upThemeVar('--up-content-color', this.$u.color.contentColor || defaultInactiveColor)
|
|
173
211
|
}
|
|
174
212
|
// 如果当前菜单被禁用,则加上对应颜色,需要在此做处理,是因为nvue下,无法在style样式中通过!import覆盖标签的内联样式
|
|
@@ -375,6 +413,7 @@
|
|
|
375
413
|
&__item {
|
|
376
414
|
padding: 0 11px;
|
|
377
415
|
@include flex;
|
|
416
|
+
position: relative;
|
|
378
417
|
align-items: center;
|
|
379
418
|
justify-content: center;
|
|
380
419
|
/* #ifdef H5 */
|
|
@@ -396,6 +435,30 @@
|
|
|
396
435
|
color: $u-disabled-color !important;
|
|
397
436
|
}
|
|
398
437
|
}
|
|
438
|
+
|
|
439
|
+
&__card-corner {
|
|
440
|
+
position: absolute;
|
|
441
|
+
top: 0;
|
|
442
|
+
right: -10px;
|
|
443
|
+
width: 20px;
|
|
444
|
+
height: 100%;
|
|
445
|
+
background-color: inherit;
|
|
446
|
+
transform: skewX(25deg);
|
|
447
|
+
border-top-right-radius: 10px;
|
|
448
|
+
z-index: 1;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
&__active-arrow {
|
|
452
|
+
position: absolute;
|
|
453
|
+
left: 50%;
|
|
454
|
+
bottom: -6px;
|
|
455
|
+
width: 0;
|
|
456
|
+
height: 0;
|
|
457
|
+
border-left: 6px solid transparent;
|
|
458
|
+
border-right: 6px solid transparent;
|
|
459
|
+
border-top: 6px solid #ff3b30;
|
|
460
|
+
transform: translateX(-50%);
|
|
461
|
+
}
|
|
399
462
|
}
|
|
400
463
|
|
|
401
464
|
&__line {
|
|
@@ -410,5 +473,82 @@
|
|
|
410
473
|
}
|
|
411
474
|
}
|
|
412
475
|
}
|
|
476
|
+
|
|
477
|
+
&--shape-capsule {
|
|
478
|
+
.u-tabs__wrapper__scroll-view-wrapper {
|
|
479
|
+
padding: 3px;
|
|
480
|
+
border-radius: 999px;
|
|
481
|
+
background-color: #edf0f5;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.u-tabs__wrapper__nav__item {
|
|
485
|
+
min-height: 30px;
|
|
486
|
+
padding: 0 14px;
|
|
487
|
+
border-radius: 999px;
|
|
488
|
+
transition: background-color 0.2s;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.u-tabs__wrapper__nav__item-active {
|
|
492
|
+
background-color: #ffffff;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
&--shape-card {
|
|
497
|
+
.u-tabs__wrapper__scroll-view-wrapper {
|
|
498
|
+
padding: 0;
|
|
499
|
+
border-radius: 10px;
|
|
500
|
+
background-color: #9ccde5;
|
|
501
|
+
box-shadow: inset 0 0 0 1px rgba(96, 98, 102, 0.06);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.u-tabs__wrapper__nav__item {
|
|
505
|
+
min-height: 34px;
|
|
506
|
+
padding: 0;
|
|
507
|
+
border-radius: 10px 10px 0 0;
|
|
508
|
+
transition: background-color 0.2s;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.u-tabs__wrapper__nav__item-active {
|
|
512
|
+
background-color: #f6f8fb;
|
|
513
|
+
box-shadow: inset 0 0 0 1px rgba(96, 98, 102, 0.06);
|
|
514
|
+
z-index: 2;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
&--shape-pill-arrow {
|
|
519
|
+
.u-tabs__wrapper__nav {
|
|
520
|
+
padding-bottom: 6px;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.u-tabs__wrapper__nav__item {
|
|
524
|
+
min-height: 32px;
|
|
525
|
+
padding: 0 12px;
|
|
526
|
+
border-radius: 8px;
|
|
527
|
+
background-color: #e8e8e8;
|
|
528
|
+
margin-right: 8px;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.u-tabs__wrapper__nav__item-active {
|
|
532
|
+
background: linear-gradient(90deg, #ff6c57 0%, #ff3b30 100%);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
&--shape-tag {
|
|
537
|
+
.u-tabs__wrapper__nav {
|
|
538
|
+
padding: 2px 0;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.u-tabs__wrapper__nav__item {
|
|
542
|
+
min-height: 28px;
|
|
543
|
+
padding: 0 14px;
|
|
544
|
+
border-radius: 999px;
|
|
545
|
+
background-color: #f3f4f6;
|
|
546
|
+
margin-right: 8px;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.u-tabs__wrapper__nav__item-active {
|
|
550
|
+
background-color: #2a6bf6;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
413
553
|
}
|
|
414
554
|
</style>
|
|
@@ -164,6 +164,15 @@
|
|
|
164
164
|
async propsChange() {
|
|
165
165
|
await this.getElRect()
|
|
166
166
|
// this.getTooltipStyle();
|
|
167
|
+
},
|
|
168
|
+
show(val) {
|
|
169
|
+
if (this.triggerMode === 'manual') {
|
|
170
|
+
if (val) {
|
|
171
|
+
this.open()
|
|
172
|
+
} else {
|
|
173
|
+
this.close()
|
|
174
|
+
}
|
|
175
|
+
}
|
|
167
176
|
}
|
|
168
177
|
},
|
|
169
178
|
computed: {
|
|
@@ -231,7 +240,7 @@
|
|
|
231
240
|
mounted() {
|
|
232
241
|
this.init()
|
|
233
242
|
},
|
|
234
|
-
emits: ["click"],
|
|
243
|
+
emits: ["click", "open", "close"],
|
|
235
244
|
methods: {
|
|
236
245
|
addStyle,
|
|
237
246
|
addUnit,
|
|
@@ -241,27 +250,34 @@
|
|
|
241
250
|
},
|
|
242
251
|
// 点击触发事件
|
|
243
252
|
async clickHander() {
|
|
244
|
-
// this.getTooltipStyle();
|
|
245
253
|
if (this.triggerMode == 'click') {
|
|
246
|
-
this.
|
|
247
|
-
this.showTooltip = true
|
|
254
|
+
this.open()
|
|
248
255
|
}
|
|
249
256
|
},
|
|
250
257
|
// 长按触发事件
|
|
251
258
|
async longpressHandler() {
|
|
252
|
-
// this.getTooltipStyle();
|
|
253
259
|
if (this.triggerMode == 'longpress') {
|
|
254
|
-
this.
|
|
255
|
-
this.showTooltip = true
|
|
260
|
+
this.open()
|
|
256
261
|
}
|
|
257
262
|
},
|
|
263
|
+
// 打开tooltip
|
|
264
|
+
open() {
|
|
265
|
+
this.tooltipTop = 0
|
|
266
|
+
this.showTooltip = true
|
|
267
|
+
this.$emit('open')
|
|
268
|
+
},
|
|
269
|
+
// 关闭tooltip
|
|
270
|
+
close() {
|
|
271
|
+
this.showTooltip = false
|
|
272
|
+
this.$emit('close')
|
|
273
|
+
},
|
|
258
274
|
// 点击透明遮罩
|
|
259
275
|
overlayClickHandler() {
|
|
260
|
-
this.
|
|
276
|
+
this.close()
|
|
261
277
|
},
|
|
262
278
|
// 点击弹出按钮
|
|
263
279
|
btnClickHandler(index) {
|
|
264
|
-
this.
|
|
280
|
+
this.close()
|
|
265
281
|
// 如果需要展示复制按钮,此处index需要加1,因为复制按钮在第一个位置
|
|
266
282
|
this.$emit('click', this.showCopy ? index + 1 : index)
|
|
267
283
|
},
|
|
@@ -308,7 +324,7 @@
|
|
|
308
324
|
// 复制文本到粘贴板
|
|
309
325
|
setClipboardData() {
|
|
310
326
|
// 关闭组件
|
|
311
|
-
this.
|
|
327
|
+
this.close()
|
|
312
328
|
this.$emit('click', 0)
|
|
313
329
|
uni.setClipboardData({
|
|
314
330
|
// 优先使用copyText字段,如果没有,则默认使用text字段当做复制的内容
|
|
@@ -318,9 +334,6 @@
|
|
|
318
334
|
},
|
|
319
335
|
fail: () => {
|
|
320
336
|
this.showToast && toast('复制失败')
|
|
321
|
-
},
|
|
322
|
-
complete: () => {
|
|
323
|
-
this.showTooltip = false
|
|
324
337
|
}
|
|
325
338
|
})
|
|
326
339
|
}
|
package/libs/config/props.js
CHANGED
|
@@ -21,6 +21,7 @@ import Backtop from '../../components/u-back-top/backtop'
|
|
|
21
21
|
import Badge from '../../components/u-badge/badge'
|
|
22
22
|
import Button from '../../components/u-button/button'
|
|
23
23
|
import Calendar from '../../components/u-calendar/calendar'
|
|
24
|
+
import CalendarStrip from '../../components/u-calendar-strip/calendarStrip'
|
|
24
25
|
import CarKeyboard from '../../components/u-car-keyboard/carKeyboard'
|
|
25
26
|
import Card from '../../components/u-card/card'
|
|
26
27
|
import Cell from '../../components/u-cell/cell'
|
|
@@ -42,6 +43,7 @@ import Empty from '../../components/u-empty/empty'
|
|
|
42
43
|
import Form from '../../components/u-form/form'
|
|
43
44
|
import FormItem from '../../components/u-form-item/formItem'
|
|
44
45
|
import Gap from '../../components/u-gap/gap'
|
|
46
|
+
import Guide from '../../components/u-guide/guide'
|
|
45
47
|
import Grid from '../../components/u-grid/grid'
|
|
46
48
|
import GridItem from '../../components/u-grid-item/gridItem'
|
|
47
49
|
import Icon from '../../components/u-icon/icon'
|
|
@@ -112,6 +114,7 @@ const props = {
|
|
|
112
114
|
...Badge,
|
|
113
115
|
...Button,
|
|
114
116
|
...Calendar,
|
|
117
|
+
...CalendarStrip,
|
|
115
118
|
...CarKeyboard,
|
|
116
119
|
...Card,
|
|
117
120
|
...Cell,
|
|
@@ -133,6 +136,7 @@ const props = {
|
|
|
133
136
|
...Form,
|
|
134
137
|
...FormItem,
|
|
135
138
|
...Gap,
|
|
139
|
+
...Guide,
|
|
136
140
|
...Grid,
|
|
137
141
|
...GridItem,
|
|
138
142
|
...Icon,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "uview-plus",
|
|
3
3
|
"name": "uview-plus",
|
|
4
4
|
"displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙跨端移动组件库,组件丰富维护更新稳定。",
|
|
5
|
-
"version": "3.8.
|
|
5
|
+
"version": "3.8.49",
|
|
6
6
|
"description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uview",
|
|
@@ -124,6 +124,11 @@ declare interface CalendarProps {
|
|
|
124
124
|
* @default false
|
|
125
125
|
*/
|
|
126
126
|
allowSameDay?: boolean
|
|
127
|
+
/**
|
|
128
|
+
* 区间模式下确认返回值格式,`all`返回区间内所有日期,`boundary`仅返回起止日期
|
|
129
|
+
* @default "all"
|
|
130
|
+
*/
|
|
131
|
+
rangeResultMode?: 'all' | 'boundary'
|
|
127
132
|
/**
|
|
128
133
|
* 圆角值,默认无圆角
|
|
129
134
|
* @default 0
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from './_common'
|
|
2
|
+
|
|
3
|
+
declare interface CalendarStripPayload {
|
|
4
|
+
date: string
|
|
5
|
+
month: string
|
|
6
|
+
scene: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare interface CalendarStripProps {
|
|
10
|
+
/**
|
|
11
|
+
* 当前选中日期
|
|
12
|
+
*/
|
|
13
|
+
modelValue?: string | number | Date | null
|
|
14
|
+
/**
|
|
15
|
+
* 最小可选日期
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
minDate?: string | number
|
|
19
|
+
/**
|
|
20
|
+
* 最大可选日期
|
|
21
|
+
* @default 0
|
|
22
|
+
*/
|
|
23
|
+
maxDate?: string | number
|
|
24
|
+
/**
|
|
25
|
+
* 主题色
|
|
26
|
+
* @default "#3c9cff"
|
|
27
|
+
*/
|
|
28
|
+
color?: string
|
|
29
|
+
/**
|
|
30
|
+
* 星期文案(周一到周日)
|
|
31
|
+
*/
|
|
32
|
+
weekText?: string[]
|
|
33
|
+
/**
|
|
34
|
+
* 是否支持下拉展开完整月历
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
fullCalendar?: boolean
|
|
38
|
+
/**
|
|
39
|
+
* 透传给内嵌 up-calendar 的额外参数
|
|
40
|
+
*/
|
|
41
|
+
fullCalendarProps?: Record<string, any>
|
|
42
|
+
/**
|
|
43
|
+
* 完整月历可浏览月份数(仅在未传 minDate/maxDate 时生效)
|
|
44
|
+
* @default 24
|
|
45
|
+
*/
|
|
46
|
+
fullMonthNum?: string | number
|
|
47
|
+
/**
|
|
48
|
+
* 下拉/上拉手势触发阈值,单位 px
|
|
49
|
+
* @default 40
|
|
50
|
+
*/
|
|
51
|
+
pullDownThreshold?: string | number
|
|
52
|
+
/**
|
|
53
|
+
* 在完整月历中选择日期后是否自动收起
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
collapseAfterSelect?: boolean
|
|
57
|
+
/**
|
|
58
|
+
* 是否只读
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
readonly?: boolean
|
|
62
|
+
/**
|
|
63
|
+
* 是否高亮今天
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
showToday?: boolean
|
|
67
|
+
/**
|
|
68
|
+
* 顶部月份格式化模板,遵循 dayjs 格式
|
|
69
|
+
*/
|
|
70
|
+
monthFormat?: string
|
|
71
|
+
/**
|
|
72
|
+
* 收起状态提示文案
|
|
73
|
+
* @default "下拉展开月历"
|
|
74
|
+
*/
|
|
75
|
+
expandHint?: string
|
|
76
|
+
/**
|
|
77
|
+
* 展开状态提示文案
|
|
78
|
+
* @default "上拉收起月历"
|
|
79
|
+
*/
|
|
80
|
+
collapseHint?: string
|
|
81
|
+
/**
|
|
82
|
+
* 日期变更时触发
|
|
83
|
+
*/
|
|
84
|
+
onChange?: (payload: CalendarStripPayload) => any
|
|
85
|
+
/**
|
|
86
|
+
* 日期确认时触发
|
|
87
|
+
*/
|
|
88
|
+
onConfirm?: (payload: CalendarStripPayload) => any
|
|
89
|
+
/**
|
|
90
|
+
* 月份变更时触发
|
|
91
|
+
*/
|
|
92
|
+
onMonthChange?: (payload: { month: string; scene: string }) => any
|
|
93
|
+
/**
|
|
94
|
+
* 展开/收起完整月历时触发
|
|
95
|
+
*/
|
|
96
|
+
onToggleFull?: (payload: { show: boolean; source: string }) => any
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare interface _CalendarStrip {
|
|
100
|
+
new (): {
|
|
101
|
+
$props: AllowedComponentProps &
|
|
102
|
+
VNodeProps &
|
|
103
|
+
CalendarStripProps
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare interface _CalendarStripRef {
|
|
108
|
+
prevMonth: () => void
|
|
109
|
+
nextMonth: () => void
|
|
110
|
+
toggleFull: () => void
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare const CalendarStrip: _CalendarStrip
|
|
114
|
+
|
|
115
|
+
export declare const CalendarStripRef: _CalendarStripRef
|
|
116
|
+
|
|
@@ -23,7 +23,7 @@ declare interface DatetimePickerProps {
|
|
|
23
23
|
* 展示格式
|
|
24
24
|
* @default "datetime"
|
|
25
25
|
*/
|
|
26
|
-
mode?: 'datetime' | 'date' | 'time' | 'year-month'
|
|
26
|
+
mode?: 'datetime' | 'date' | 'time' | 'year-month' | 'datehour' | 'timesecond' | 'datetimesecond'
|
|
27
27
|
/**
|
|
28
28
|
* 可选的最大时间(时间戳毫秒)
|
|
29
29
|
* @default 最大默认值为后10年
|
|
@@ -35,25 +35,35 @@ declare interface DatetimePickerProps {
|
|
|
35
35
|
*/
|
|
36
36
|
minDate?: number
|
|
37
37
|
/**
|
|
38
|
-
* 可选的最小小时,仅mode=time有效
|
|
38
|
+
* 可选的最小小时,仅mode=time/timesecond有效
|
|
39
39
|
* @default 0
|
|
40
40
|
*/
|
|
41
41
|
minHour?: number
|
|
42
42
|
/**
|
|
43
|
-
* 可选的最大小时,仅mode=time有效
|
|
43
|
+
* 可选的最大小时,仅mode=time/timesecond有效
|
|
44
44
|
* @default 23
|
|
45
45
|
*/
|
|
46
46
|
maxHour?: number
|
|
47
47
|
/**
|
|
48
|
-
* 可选的最小分钟,仅mode=time有效
|
|
48
|
+
* 可选的最小分钟,仅mode=time/timesecond有效
|
|
49
49
|
* @default 0
|
|
50
50
|
*/
|
|
51
51
|
minMinute?: number
|
|
52
52
|
/**
|
|
53
|
-
* 可选的最大分钟,仅mode=time有效
|
|
53
|
+
* 可选的最大分钟,仅mode=time/timesecond有效
|
|
54
54
|
* @default 59
|
|
55
55
|
*/
|
|
56
56
|
maxMinute?: number
|
|
57
|
+
/**
|
|
58
|
+
* 可选的最小秒,仅mode=timesecond有效
|
|
59
|
+
* @default 0
|
|
60
|
+
*/
|
|
61
|
+
minSecond?: number
|
|
62
|
+
/**
|
|
63
|
+
* 可选的最大秒,仅mode=timesecond有效
|
|
64
|
+
* @default 59
|
|
65
|
+
*/
|
|
66
|
+
maxSecond?: number
|
|
57
67
|
/**
|
|
58
68
|
* 选项过滤函数
|
|
59
69
|
* @default null
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from './_common'
|
|
2
|
+
|
|
3
|
+
declare interface GuideItem {
|
|
4
|
+
image: string
|
|
5
|
+
title?: string
|
|
6
|
+
desc?: string
|
|
7
|
+
backgroundColor?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare interface GuideProps {
|
|
11
|
+
show?: boolean
|
|
12
|
+
list?: GuideItem[]
|
|
13
|
+
storageKey?: string
|
|
14
|
+
once?: boolean
|
|
15
|
+
showSkip?: boolean
|
|
16
|
+
skipText?: string
|
|
17
|
+
nextText?: string
|
|
18
|
+
finishText?: string
|
|
19
|
+
indicator?: boolean
|
|
20
|
+
bgColor?: string
|
|
21
|
+
zIndex?: string | number
|
|
22
|
+
['onUpdate:show']?: (value: boolean) => any
|
|
23
|
+
onChange?: (payload: { current: number }) => any
|
|
24
|
+
onSkip?: () => any
|
|
25
|
+
onFinish?: () => any
|
|
26
|
+
onClose?: () => any
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare interface _GuideRef {
|
|
30
|
+
open: () => void
|
|
31
|
+
close: (remember?: boolean) => void
|
|
32
|
+
reset: () => void
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare interface _Guide {
|
|
36
|
+
new (): {
|
|
37
|
+
$props: AllowedComponentProps &
|
|
38
|
+
VNodeProps &
|
|
39
|
+
GuideProps
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export declare const Guide: _Guide
|
|
44
|
+
|
|
45
|
+
export declare const GuideRef: _GuideRef
|
package/types/comps/tabs.d.ts
CHANGED