@varlet/ui 1.24.11 → 1.25.0-alpha.1642582155449
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/es/app-bar/AppBar.js +25 -4
- package/es/button/Button.js +19 -7
- package/es/button/props.js +4 -0
- package/es/date-picker/DatePicker.js +39 -22
- package/es/date-picker/src/day-picker-panel.js +6 -2
- package/es/date-picker/src/month-picker-panel.js +4 -4
- package/es/snackbar/style/index.js +1 -1
- package/es/snackbar/style/less.js +1 -1
- package/es/swipe/Swipe.js +9 -3
- package/es/utils/shared.js +1 -0
- package/highlight/attributes.json +56 -52
- package/highlight/tags.json +1 -0
- package/highlight/web-types.json +72 -63
- package/lib/app-bar/AppBar.js +24 -3
- package/lib/button/Button.js +18 -6
- package/lib/button/props.js +4 -0
- package/lib/date-picker/DatePicker.js +39 -22
- package/lib/date-picker/src/day-picker-panel.js +6 -2
- package/lib/date-picker/src/month-picker-panel.js +4 -4
- package/lib/swipe/Swipe.js +8 -2
- package/lib/utils/shared.js +5 -1
- package/package.json +4 -4
- package/types/button.d.ts +1 -0
- package/umd/varlet.js +3 -3
package/highlight/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "1.24.
|
|
4
|
+
"version": "1.24.11",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"name": "title-position",
|
|
172
|
-
"description": "
|
|
172
|
+
"description": "标题位置,可选值为 `left` `center` `right`",
|
|
173
173
|
"default": "left",
|
|
174
174
|
"value": {
|
|
175
175
|
"type": "string",
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"slots": [
|
|
191
191
|
{
|
|
192
192
|
"name": "default",
|
|
193
|
-
"description": "
|
|
193
|
+
"description": "自定义标题内容,会覆盖 `title` 的内容"
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"name": "left",
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
"attributes": [
|
|
252
252
|
{
|
|
253
253
|
"name": "type",
|
|
254
|
-
"description": "
|
|
254
|
+
"description": "类型,可选值为 `default` `primary` `info` `success` `warning` `danger`",
|
|
255
255
|
"default": "default",
|
|
256
256
|
"value": {
|
|
257
257
|
"type": "string",
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
},
|
|
306
306
|
{
|
|
307
307
|
"name": "icon",
|
|
308
|
-
"description": "
|
|
308
|
+
"description": "自定义徽标中图标的内容(优先级高于 `value`)",
|
|
309
309
|
"default": "-",
|
|
310
310
|
"value": {
|
|
311
311
|
"type": "string",
|
|
@@ -354,9 +354,9 @@
|
|
|
354
354
|
{
|
|
355
355
|
"name": "loading-radius",
|
|
356
356
|
"description": "loading 的半径,只作用于 `loading-type=\"circle\"` 时",
|
|
357
|
-
"default": "
|
|
357
|
+
"default": "number_",
|
|
358
358
|
"value": {
|
|
359
|
-
"type": "string
|
|
359
|
+
"type": "string \\",
|
|
360
360
|
"kind": "expression"
|
|
361
361
|
}
|
|
362
362
|
},
|
|
@@ -378,6 +378,15 @@
|
|
|
378
378
|
"kind": "expression"
|
|
379
379
|
}
|
|
380
380
|
},
|
|
381
|
+
{
|
|
382
|
+
"name": "auto-loading",
|
|
383
|
+
"description": "自动 loading 模式,方便处理异步任务",
|
|
384
|
+
"default": "false",
|
|
385
|
+
"value": {
|
|
386
|
+
"type": "boolean",
|
|
387
|
+
"kind": "expression"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
381
390
|
{
|
|
382
391
|
"name": "round",
|
|
383
392
|
"description": "是否是圆形按钮",
|
|
@@ -864,7 +873,7 @@
|
|
|
864
873
|
},
|
|
865
874
|
{
|
|
866
875
|
"name": "size",
|
|
867
|
-
"description": "
|
|
876
|
+
"description": "尺寸,可选值为 `normal` `mini` `small` `large`",
|
|
868
877
|
"default": "normal",
|
|
869
878
|
"value": {
|
|
870
879
|
"type": "string",
|
|
@@ -1039,7 +1048,7 @@
|
|
|
1039
1048
|
},
|
|
1040
1049
|
{
|
|
1041
1050
|
"name": "icon",
|
|
1042
|
-
"description": "自定义右侧icon"
|
|
1051
|
+
"description": "自定义右侧 icon"
|
|
1043
1052
|
}
|
|
1044
1053
|
]
|
|
1045
1054
|
},
|
|
@@ -1104,7 +1113,7 @@
|
|
|
1104
1113
|
"attributes": [
|
|
1105
1114
|
{
|
|
1106
1115
|
"name": "time",
|
|
1107
|
-
"description": "
|
|
1116
|
+
"description": "倒计时时长(ms)",
|
|
1108
1117
|
"default": "0",
|
|
1109
1118
|
"value": {
|
|
1110
1119
|
"type": "string | number",
|
|
@@ -1314,7 +1323,7 @@
|
|
|
1314
1323
|
},
|
|
1315
1324
|
{
|
|
1316
1325
|
"name": "validate-trigger",
|
|
1317
|
-
"description": "
|
|
1326
|
+
"description": "触发验证的时机,可选值为 `onInputChange` `onLazyChange` `onIncrement` `onDecrement`",
|
|
1318
1327
|
"default": "['onIncrement', 'onDecrement', 'onInputChange', 'onLazyChange']",
|
|
1319
1328
|
"value": {
|
|
1320
1329
|
"type": "ValidateTriggers[]",
|
|
@@ -1357,7 +1366,7 @@
|
|
|
1357
1366
|
{
|
|
1358
1367
|
"name": "v-model",
|
|
1359
1368
|
"description": "被选择的日期(ISO 8601 格式,`YYYY-MM-DD` 或 `YYYY-MM`)",
|
|
1360
|
-
"default": "
|
|
1369
|
+
"default": "undefined",
|
|
1361
1370
|
"value": {
|
|
1362
1371
|
"type": "string[] | string",
|
|
1363
1372
|
"kind": "expression"
|
|
@@ -1365,7 +1374,7 @@
|
|
|
1365
1374
|
},
|
|
1366
1375
|
{
|
|
1367
1376
|
"name": "type",
|
|
1368
|
-
"description": "选择器类型,可选值为 `date
|
|
1377
|
+
"description": "选择器类型,可选值为 `date month`",
|
|
1369
1378
|
"default": "date",
|
|
1370
1379
|
"value": {
|
|
1371
1380
|
"type": "string",
|
|
@@ -1533,7 +1542,7 @@
|
|
|
1533
1542
|
},
|
|
1534
1543
|
{
|
|
1535
1544
|
"name": "message-align",
|
|
1536
|
-
"description": "对话框内容文字对齐方式,可选值 `center
|
|
1545
|
+
"description": "对话框内容文字对齐方式,可选值 `center` `left` `right`",
|
|
1537
1546
|
"default": "left",
|
|
1538
1547
|
"value": {
|
|
1539
1548
|
"type": "string",
|
|
@@ -1846,7 +1855,7 @@
|
|
|
1846
1855
|
},
|
|
1847
1856
|
{
|
|
1848
1857
|
"name": "transition",
|
|
1849
|
-
"description": "
|
|
1858
|
+
"description": "过渡动画时间(ms)",
|
|
1850
1859
|
"default": "0",
|
|
1851
1860
|
"value": {
|
|
1852
1861
|
"type": "string | number",
|
|
@@ -1876,7 +1885,7 @@
|
|
|
1876
1885
|
},
|
|
1877
1886
|
{
|
|
1878
1887
|
"name": "fit",
|
|
1879
|
-
"description": "填充模式, 可选值为 `fill
|
|
1888
|
+
"description": "填充模式, 可选值为 `fill contain cover none scale-down`",
|
|
1880
1889
|
"default": "fill",
|
|
1881
1890
|
"value": {
|
|
1882
1891
|
"type": "string",
|
|
@@ -2344,7 +2353,7 @@
|
|
|
2344
2353
|
},
|
|
2345
2354
|
{
|
|
2346
2355
|
"name": "validate-trigger",
|
|
2347
|
-
"description": "
|
|
2356
|
+
"description": "触发验证的时机,可选值为 `onFocus` `onBlur` `onChange` `onClick` `onClear` `onInput`",
|
|
2348
2357
|
"default": "['onInput', 'onClear']",
|
|
2349
2358
|
"value": {
|
|
2350
2359
|
"type": "ValidateTriggers[]",
|
|
@@ -2595,7 +2604,7 @@
|
|
|
2595
2604
|
},
|
|
2596
2605
|
{
|
|
2597
2606
|
"name": "alignment",
|
|
2598
|
-
"description": "菜单的对齐方式, 可选值为 `top` `bottom`, 源点为默认插槽的左上角,top为菜单顶部对齐源点,bottom为菜单底部对齐",
|
|
2607
|
+
"description": "菜单的对齐方式, 可选值为 `top` `bottom`, 源点为默认插槽的左上角,top 为菜单顶部对齐源点,bottom 为菜单底部对齐",
|
|
2599
2608
|
"default": "top",
|
|
2600
2609
|
"value": {
|
|
2601
2610
|
"type": "string",
|
|
@@ -2604,7 +2613,7 @@
|
|
|
2604
2613
|
},
|
|
2605
2614
|
{
|
|
2606
2615
|
"name": "offset-x",
|
|
2607
|
-
"description": "x轴偏移量, 相对于菜单对齐后的位置",
|
|
2616
|
+
"description": "x 轴偏移量, 相对于菜单对齐后的位置",
|
|
2608
2617
|
"default": "0",
|
|
2609
2618
|
"value": {
|
|
2610
2619
|
"type": "number | string",
|
|
@@ -2613,7 +2622,7 @@
|
|
|
2613
2622
|
},
|
|
2614
2623
|
{
|
|
2615
2624
|
"name": "offset-y",
|
|
2616
|
-
"description": "y轴偏移量, 相对于菜单对齐后的位置",
|
|
2625
|
+
"description": "y 轴偏移量, 相对于菜单对齐后的位置",
|
|
2617
2626
|
"default": "0",
|
|
2618
2627
|
"value": {
|
|
2619
2628
|
"type": "number | string",
|
|
@@ -2823,7 +2832,7 @@
|
|
|
2823
2832
|
},
|
|
2824
2833
|
{
|
|
2825
2834
|
"name": "text-key",
|
|
2826
|
-
"description": "文本的属性key",
|
|
2835
|
+
"description": "文本的属性 key",
|
|
2827
2836
|
"default": "text",
|
|
2828
2837
|
"value": {
|
|
2829
2838
|
"type": "string",
|
|
@@ -2964,7 +2973,7 @@
|
|
|
2964
2973
|
},
|
|
2965
2974
|
{
|
|
2966
2975
|
"name": "overlay-class",
|
|
2967
|
-
"description": "自定义遮罩层的class",
|
|
2976
|
+
"description": "自定义遮罩层的 class",
|
|
2968
2977
|
"default": "-",
|
|
2969
2978
|
"value": {
|
|
2970
2979
|
"type": "string",
|
|
@@ -2973,7 +2982,7 @@
|
|
|
2973
2982
|
},
|
|
2974
2983
|
{
|
|
2975
2984
|
"name": "overlay-style",
|
|
2976
|
-
"description": "自定义遮罩层的style",
|
|
2985
|
+
"description": "自定义遮罩层的 style",
|
|
2977
2986
|
"default": "-",
|
|
2978
2987
|
"value": {
|
|
2979
2988
|
"type": "string",
|
|
@@ -2991,7 +3000,7 @@
|
|
|
2991
3000
|
},
|
|
2992
3001
|
{
|
|
2993
3002
|
"name": "lock-scroll",
|
|
2994
|
-
"description": "是否禁止滚动穿透,禁止时滚动弹出层不会引发body的滚动",
|
|
3003
|
+
"description": "是否禁止滚动穿透,禁止时滚动弹出层不会引发 body 的滚动",
|
|
2995
3004
|
"default": "true",
|
|
2996
3005
|
"value": {
|
|
2997
3006
|
"type": "boolean",
|
|
@@ -3051,7 +3060,7 @@
|
|
|
3051
3060
|
"attributes": [
|
|
3052
3061
|
{
|
|
3053
3062
|
"name": "mode",
|
|
3054
|
-
"description": "`progress`
|
|
3063
|
+
"description": "`progress` 的模式,可选值为 `linear, circle`",
|
|
3055
3064
|
"default": "linear",
|
|
3056
3065
|
"value": {
|
|
3057
3066
|
"type": "string",
|
|
@@ -3171,7 +3180,7 @@
|
|
|
3171
3180
|
},
|
|
3172
3181
|
{
|
|
3173
3182
|
"name": "animation-duration",
|
|
3174
|
-
"description": "
|
|
3183
|
+
"description": "加载结束后回到初始位置的动画时长(ms)",
|
|
3175
3184
|
"default": "300",
|
|
3176
3185
|
"value": {
|
|
3177
3186
|
"type": "string | number",
|
|
@@ -3180,7 +3189,7 @@
|
|
|
3180
3189
|
},
|
|
3181
3190
|
{
|
|
3182
3191
|
"name": "success-duration",
|
|
3183
|
-
"description": "
|
|
3192
|
+
"description": "成功提示展示时长(ms)",
|
|
3184
3193
|
"default": "2000",
|
|
3185
3194
|
"value": {
|
|
3186
3195
|
"type": "string | number",
|
|
@@ -3189,7 +3198,7 @@
|
|
|
3189
3198
|
},
|
|
3190
3199
|
{
|
|
3191
3200
|
"name": "bg-color",
|
|
3192
|
-
"description": "control的背景颜色",
|
|
3201
|
+
"description": "control 的背景颜色",
|
|
3193
3202
|
"default": "#005CAF",
|
|
3194
3203
|
"value": {
|
|
3195
3204
|
"type": "string",
|
|
@@ -3207,7 +3216,7 @@
|
|
|
3207
3216
|
},
|
|
3208
3217
|
{
|
|
3209
3218
|
"name": "success-bg-color",
|
|
3210
|
-
"description": "成功状态下control的背景颜色",
|
|
3219
|
+
"description": "成功状态下 control 的背景颜色",
|
|
3211
3220
|
"default": "#4CAF50",
|
|
3212
3221
|
"value": {
|
|
3213
3222
|
"type": "string",
|
|
@@ -3216,7 +3225,7 @@
|
|
|
3216
3225
|
},
|
|
3217
3226
|
{
|
|
3218
3227
|
"name": "success-color",
|
|
3219
|
-
"description": "成功状态下control的颜色",
|
|
3228
|
+
"description": "成功状态下 control 的颜色",
|
|
3220
3229
|
"default": "ffffff",
|
|
3221
3230
|
"value": {
|
|
3222
3231
|
"type": "string",
|
|
@@ -3323,7 +3332,7 @@
|
|
|
3323
3332
|
},
|
|
3324
3333
|
{
|
|
3325
3334
|
"name": "rules",
|
|
3326
|
-
"description": "
|
|
3335
|
+
"description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
|
|
3327
3336
|
"default": "-",
|
|
3328
3337
|
"value": {
|
|
3329
3338
|
"type": "Array<(value: any) => any>",
|
|
@@ -3379,7 +3388,7 @@
|
|
|
3379
3388
|
},
|
|
3380
3389
|
{
|
|
3381
3390
|
"name": "rules",
|
|
3382
|
-
"description": "
|
|
3391
|
+
"description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
|
|
3383
3392
|
"default": "-",
|
|
3384
3393
|
"value": {
|
|
3385
3394
|
"type": "Array<(value: any) => any>",
|
|
@@ -3459,7 +3468,7 @@
|
|
|
3459
3468
|
},
|
|
3460
3469
|
{
|
|
3461
3470
|
"name": "size",
|
|
3462
|
-
"description": "
|
|
3471
|
+
"description": "图标大小,默认单位为 `px`",
|
|
3463
3472
|
"default": "20",
|
|
3464
3473
|
"value": {
|
|
3465
3474
|
"type": "number | string",
|
|
@@ -3468,7 +3477,7 @@
|
|
|
3468
3477
|
},
|
|
3469
3478
|
{
|
|
3470
3479
|
"name": "gap",
|
|
3471
|
-
"description": "
|
|
3480
|
+
"description": "图标间隔,默认单位为 `px`",
|
|
3472
3481
|
"default": "4",
|
|
3473
3482
|
"value": {
|
|
3474
3483
|
"type": "number | string",
|
|
@@ -3486,7 +3495,7 @@
|
|
|
3486
3495
|
},
|
|
3487
3496
|
{
|
|
3488
3497
|
"name": "half-icon",
|
|
3489
|
-
"description": "
|
|
3498
|
+
"description": "半选时图标的样式,只有在 `half` 为 `true` 时才有效",
|
|
3490
3499
|
"default": "star-half-full",
|
|
3491
3500
|
"value": {
|
|
3492
3501
|
"type": "string",
|
|
@@ -3504,7 +3513,7 @@
|
|
|
3504
3513
|
},
|
|
3505
3514
|
{
|
|
3506
3515
|
"name": "disabled-color",
|
|
3507
|
-
"description": "
|
|
3516
|
+
"description": "禁止评分时图标的颜色,只有在 `disabled` 为 `true` 时才有效,优先级高于 `color`、`empty-color`",
|
|
3508
3517
|
"default": "-",
|
|
3509
3518
|
"value": {
|
|
3510
3519
|
"type": "string",
|
|
@@ -3531,7 +3540,7 @@
|
|
|
3531
3540
|
},
|
|
3532
3541
|
{
|
|
3533
3542
|
"name": "rules",
|
|
3534
|
-
"description": "
|
|
3543
|
+
"description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
|
|
3535
3544
|
"default": "-",
|
|
3536
3545
|
"value": {
|
|
3537
3546
|
"type": "Array<(v: string | number) => any>",
|
|
@@ -3710,7 +3719,7 @@
|
|
|
3710
3719
|
},
|
|
3711
3720
|
{
|
|
3712
3721
|
"name": "validate-trigger",
|
|
3713
|
-
"description": "
|
|
3722
|
+
"description": "触发验证的时机,可选值为 `onFocus` `onBlur` `onChange` `onClick` `onClear` `onClose`",
|
|
3714
3723
|
"default": "['onChange', 'onClear', 'onClose']",
|
|
3715
3724
|
"value": {
|
|
3716
3725
|
"type": "ValidateTriggers[]",
|
|
@@ -3719,7 +3728,7 @@
|
|
|
3719
3728
|
},
|
|
3720
3729
|
{
|
|
3721
3730
|
"name": "rules",
|
|
3722
|
-
"description": "
|
|
3731
|
+
"description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
|
|
3723
3732
|
"default": "-",
|
|
3724
3733
|
"value": {
|
|
3725
3734
|
"type": "Array<(v: any | any[]) => any>",
|
|
@@ -3880,7 +3889,7 @@
|
|
|
3880
3889
|
},
|
|
3881
3890
|
{
|
|
3882
3891
|
"name": "step",
|
|
3883
|
-
"description": "
|
|
3892
|
+
"description": "步长,取值为 `1 ~ 100` 间的整数",
|
|
3884
3893
|
"default": "1",
|
|
3885
3894
|
"value": {
|
|
3886
3895
|
"type": "string | number",
|
|
@@ -3898,7 +3907,7 @@
|
|
|
3898
3907
|
},
|
|
3899
3908
|
{
|
|
3900
3909
|
"name": "label-visible",
|
|
3901
|
-
"description": "
|
|
3910
|
+
"description": "是否显示标签,可选值为 `always normal never`",
|
|
3902
3911
|
"default": "normal",
|
|
3903
3912
|
"value": {
|
|
3904
3913
|
"type": "string",
|
|
@@ -3986,7 +3995,7 @@
|
|
|
3986
3995
|
"attributes": [
|
|
3987
3996
|
{
|
|
3988
3997
|
"name": "v-model:show",
|
|
3989
|
-
"description": "
|
|
3998
|
+
"description": "是否显示 `Snackbar`",
|
|
3990
3999
|
"default": "false",
|
|
3991
4000
|
"value": {
|
|
3992
4001
|
"type": "boolean",
|
|
@@ -3995,7 +4004,7 @@
|
|
|
3995
4004
|
},
|
|
3996
4005
|
{
|
|
3997
4006
|
"name": "type",
|
|
3998
|
-
"description": "`Snackbar
|
|
4007
|
+
"description": "`Snackbar` 类型,可选值为 `success warning info error loading`",
|
|
3999
4008
|
"default": "-",
|
|
4000
4009
|
"value": {
|
|
4001
4010
|
"type": "string",
|
|
@@ -4004,7 +4013,7 @@
|
|
|
4004
4013
|
},
|
|
4005
4014
|
{
|
|
4006
4015
|
"name": "position",
|
|
4007
|
-
"description": "`Snackbar
|
|
4016
|
+
"description": "`Snackbar` 位置,可选值为 `top center bottom`",
|
|
4008
4017
|
"default": "top",
|
|
4009
4018
|
"value": {
|
|
4010
4019
|
"type": "string",
|
|
@@ -4049,7 +4058,7 @@
|
|
|
4049
4058
|
},
|
|
4050
4059
|
{
|
|
4051
4060
|
"name": "loading-type",
|
|
4052
|
-
"description": "加载动画类型(
|
|
4061
|
+
"description": "加载动画类型(见 `Loading` 组件)",
|
|
4053
4062
|
"default": "circle",
|
|
4054
4063
|
"value": {
|
|
4055
4064
|
"type": "string",
|
|
@@ -4058,7 +4067,7 @@
|
|
|
4058
4067
|
},
|
|
4059
4068
|
{
|
|
4060
4069
|
"name": "loading-size",
|
|
4061
|
-
"description": "加载动画大小(
|
|
4070
|
+
"description": "加载动画大小(见 `Loading` 组件)",
|
|
4062
4071
|
"default": "normal",
|
|
4063
4072
|
"value": {
|
|
4064
4073
|
"type": "string",
|
|
@@ -4096,19 +4105,19 @@
|
|
|
4096
4105
|
"events": [
|
|
4097
4106
|
{
|
|
4098
4107
|
"name": "open",
|
|
4099
|
-
"description": "
|
|
4108
|
+
"description": "打开 `Snackbar` 时触发"
|
|
4100
4109
|
},
|
|
4101
4110
|
{
|
|
4102
4111
|
"name": "opened",
|
|
4103
|
-
"description": "
|
|
4112
|
+
"description": "打开 `Snackbar` 动画结束时触发"
|
|
4104
4113
|
},
|
|
4105
4114
|
{
|
|
4106
4115
|
"name": "close",
|
|
4107
|
-
"description": "
|
|
4116
|
+
"description": "关闭 `Snackbar` 时触发"
|
|
4108
4117
|
},
|
|
4109
4118
|
{
|
|
4110
4119
|
"name": "closed",
|
|
4111
|
-
"description": "
|
|
4120
|
+
"description": "关闭 `Snackbar` 动画结束时触发"
|
|
4112
4121
|
}
|
|
4113
4122
|
],
|
|
4114
4123
|
"slots": [
|
|
@@ -4145,7 +4154,7 @@
|
|
|
4145
4154
|
},
|
|
4146
4155
|
{
|
|
4147
4156
|
"name": "size",
|
|
4148
|
-
"description": "间距,可选值为 `mini` `small` `normal` `large`
|
|
4157
|
+
"description": "间距,可选值为 `mini` `small` `normal` `large` 或 `[垂直间距, 水平间距]` (支持长度单位)",
|
|
4149
4158
|
"default": "normal",
|
|
4150
4159
|
"value": {
|
|
4151
4160
|
"type": "string | number | [string | number, string | number]",
|
|
@@ -4223,7 +4232,7 @@
|
|
|
4223
4232
|
"slots": [
|
|
4224
4233
|
{
|
|
4225
4234
|
"name": "default",
|
|
4226
|
-
"description": "step的内容"
|
|
4235
|
+
"description": "step 的内容"
|
|
4227
4236
|
}
|
|
4228
4237
|
]
|
|
4229
4238
|
},
|
|
@@ -4276,7 +4285,7 @@
|
|
|
4276
4285
|
"slots": [
|
|
4277
4286
|
{
|
|
4278
4287
|
"name": "default",
|
|
4279
|
-
"description": "step的内容"
|
|
4288
|
+
"description": "step 的内容"
|
|
4280
4289
|
}
|
|
4281
4290
|
]
|
|
4282
4291
|
},
|
|
@@ -4303,7 +4312,7 @@
|
|
|
4303
4312
|
},
|
|
4304
4313
|
{
|
|
4305
4314
|
"name": "css-mode",
|
|
4306
|
-
"description": "
|
|
4315
|
+
"description": "开启原生 `css sticky` 模式",
|
|
4307
4316
|
"default": "false",
|
|
4308
4317
|
"value": {
|
|
4309
4318
|
"type": "boolean",
|
|
@@ -4312,7 +4321,7 @@
|
|
|
4312
4321
|
},
|
|
4313
4322
|
{
|
|
4314
4323
|
"name": "disabled",
|
|
4315
|
-
"description": "禁用吸顶,
|
|
4324
|
+
"description": "禁用吸顶, 设置为 `true` 时, 元素会回到文档流中",
|
|
4316
4325
|
"default": "false",
|
|
4317
4326
|
"value": {
|
|
4318
4327
|
"type": "boolean",
|
|
@@ -4374,7 +4383,7 @@
|
|
|
4374
4383
|
},
|
|
4375
4384
|
{
|
|
4376
4385
|
"name": "autoplay",
|
|
4377
|
-
"description": "自动播放间隔时间(ms)",
|
|
4386
|
+
"description": "自动播放间隔时间 (ms)",
|
|
4378
4387
|
"default": "-",
|
|
4379
4388
|
"value": {
|
|
4380
4389
|
"type": "string | number",
|
|
@@ -4554,7 +4563,7 @@
|
|
|
4554
4563
|
},
|
|
4555
4564
|
{
|
|
4556
4565
|
"name": "size",
|
|
4557
|
-
"description": "switch的大小",
|
|
4566
|
+
"description": "switch 的大小",
|
|
4558
4567
|
"default": "20",
|
|
4559
4568
|
"value": {
|
|
4560
4569
|
"type": "string | number",
|
|
@@ -4669,7 +4678,7 @@
|
|
|
4669
4678
|
"attributes": [
|
|
4670
4679
|
{
|
|
4671
4680
|
"name": "v-model:active",
|
|
4672
|
-
"description": "激活的选项卡标识, 优先匹配name,其次是index",
|
|
4681
|
+
"description": "激活的选项卡标识, 优先匹配 name,其次是 index",
|
|
4673
4682
|
"default": "default",
|
|
4674
4683
|
"value": {
|
|
4675
4684
|
"type": "string",
|
|
@@ -4678,7 +4687,7 @@
|
|
|
4678
4687
|
},
|
|
4679
4688
|
{
|
|
4680
4689
|
"name": "layout-direction",
|
|
4681
|
-
"description": "
|
|
4690
|
+
"description": "选项卡组的布局方向,可选值为 `horizontal` `vertical`",
|
|
4682
4691
|
"default": "horizontal",
|
|
4683
4692
|
"value": {
|
|
4684
4693
|
"type": "string",
|
|
@@ -4861,7 +4870,7 @@
|
|
|
4861
4870
|
},
|
|
4862
4871
|
{
|
|
4863
4872
|
"name": "format",
|
|
4864
|
-
"description": "
|
|
4873
|
+
"description": "选择器时间格式,可选值为 `ampm 24hr`",
|
|
4865
4874
|
"default": "ampm",
|
|
4866
4875
|
"value": {
|
|
4867
4876
|
"type": "string",
|
|
@@ -5062,7 +5071,7 @@
|
|
|
5062
5071
|
},
|
|
5063
5072
|
{
|
|
5064
5073
|
"name": "rules",
|
|
5065
|
-
"description": "
|
|
5074
|
+
"description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
|
|
5066
5075
|
"default": "-",
|
|
5067
5076
|
"value": {
|
|
5068
5077
|
"type": "Array<(v: VarFile, u: VarFileUtils) => any>",
|
|
@@ -5073,7 +5082,7 @@
|
|
|
5073
5082
|
"events": [
|
|
5074
5083
|
{
|
|
5075
5084
|
"name": "before-read",
|
|
5076
|
-
"description": "文件读取前触发,返回假值阻止文件读取(支持promise)"
|
|
5085
|
+
"description": "文件读取前触发,返回假值阻止文件读取(支持 promise)"
|
|
5077
5086
|
},
|
|
5078
5087
|
{
|
|
5079
5088
|
"name": "after-read",
|
|
@@ -5085,7 +5094,7 @@
|
|
|
5085
5094
|
},
|
|
5086
5095
|
{
|
|
5087
5096
|
"name": "before-remove",
|
|
5088
|
-
"description": "文件删除前触发,返回假值阻止文件删除(支持promise)"
|
|
5097
|
+
"description": "文件删除前触发,返回假值阻止文件删除(支持 promise)"
|
|
5089
5098
|
},
|
|
5090
5099
|
{
|
|
5091
5100
|
"name": "remove",
|
package/lib/app-bar/AppBar.js
CHANGED
|
@@ -34,7 +34,7 @@ function render(_ctx, _cache) {
|
|
|
34
34
|
key: 0,
|
|
35
35
|
class: "var-app-bar__title",
|
|
36
36
|
style: (0, _vue.normalizeStyle)({
|
|
37
|
-
paddingLeft: _ctx
|
|
37
|
+
paddingLeft: _ctx.paddingLeft
|
|
38
38
|
})
|
|
39
39
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.title), 1
|
|
40
40
|
/* TEXT */
|
|
@@ -46,7 +46,7 @@ function render(_ctx, _cache) {
|
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "var-app-bar__title",
|
|
48
48
|
style: (0, _vue.normalizeStyle)({
|
|
49
|
-
paddingRight: _ctx
|
|
49
|
+
paddingRight: _ctx.paddingRight
|
|
50
50
|
})
|
|
51
51
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.title), 1
|
|
52
52
|
/* TEXT */
|
|
@@ -60,7 +60,28 @@ function render(_ctx, _cache) {
|
|
|
60
60
|
var _default = (0, _vue.defineComponent)({
|
|
61
61
|
render,
|
|
62
62
|
name: 'VarAppBar',
|
|
63
|
-
props: _props.props
|
|
63
|
+
props: _props.props,
|
|
64
|
+
|
|
65
|
+
setup(props, _ref) {
|
|
66
|
+
var {
|
|
67
|
+
slots
|
|
68
|
+
} = _ref;
|
|
69
|
+
var paddingLeft = (0, _vue.ref)();
|
|
70
|
+
var paddingRight = (0, _vue.ref)();
|
|
71
|
+
|
|
72
|
+
var computePadding = () => {
|
|
73
|
+
paddingLeft.value = slots.left ? 0 : undefined;
|
|
74
|
+
paddingRight.value = slots.right ? 0 : undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
(0, _vue.onMounted)(computePadding);
|
|
78
|
+
(0, _vue.onUpdated)(computePadding);
|
|
79
|
+
return {
|
|
80
|
+
paddingLeft,
|
|
81
|
+
paddingRight
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
64
85
|
});
|
|
65
86
|
|
|
66
87
|
exports.default = _default;
|
package/lib/button/Button.js
CHANGED
|
@@ -36,7 +36,7 @@ function render(_ctx, _cache) {
|
|
|
36
36
|
onTouchstart: _cache[1] || (_cache[1] = function () {
|
|
37
37
|
return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
|
|
38
38
|
})
|
|
39
|
-
}, [_ctx.loading ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_loading, {
|
|
39
|
+
}, [_ctx.loading || _ctx.pending ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_var_loading, {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "var-button__loading",
|
|
42
42
|
"var-button-cover": "",
|
|
@@ -46,7 +46,7 @@ function render(_ctx, _cache) {
|
|
|
46
46
|
}, null, 8
|
|
47
47
|
/* PROPS */
|
|
48
48
|
, ["type", "size", "radius"])) : (0, _vue.createCommentVNode)("v-if", true), (0, _vue.createElementVNode)("div", {
|
|
49
|
-
class: (0, _vue.normalizeClass)(["var-button__content", [_ctx.loading ? 'var-button--hidden' : null]])
|
|
49
|
+
class: (0, _vue.normalizeClass)(["var-button__content", [_ctx.loading || _ctx.pending ? 'var-button--hidden' : null]])
|
|
50
50
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
51
51
|
/* CLASS */
|
|
52
52
|
)], 46
|
|
@@ -68,6 +68,17 @@ var _default = (0, _vue.defineComponent)({
|
|
|
68
68
|
props: _props.props,
|
|
69
69
|
|
|
70
70
|
setup(props) {
|
|
71
|
+
var pending = (0, _vue.ref)(false);
|
|
72
|
+
|
|
73
|
+
var attemptAutoLoading = result => {
|
|
74
|
+
if (props.autoLoading) {
|
|
75
|
+
pending.value = true;
|
|
76
|
+
Promise.resolve(result).finally(() => {
|
|
77
|
+
pending.value = false;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
71
82
|
var handleClick = e => {
|
|
72
83
|
var {
|
|
73
84
|
loading,
|
|
@@ -75,11 +86,11 @@ var _default = (0, _vue.defineComponent)({
|
|
|
75
86
|
onClick
|
|
76
87
|
} = props;
|
|
77
88
|
|
|
78
|
-
if (loading || disabled) {
|
|
89
|
+
if (!onClick || loading || disabled || pending.value) {
|
|
79
90
|
return;
|
|
80
91
|
}
|
|
81
92
|
|
|
82
|
-
onClick
|
|
93
|
+
attemptAutoLoading(onClick(e));
|
|
83
94
|
};
|
|
84
95
|
|
|
85
96
|
var handleTouchstart = e => {
|
|
@@ -89,14 +100,15 @@ var _default = (0, _vue.defineComponent)({
|
|
|
89
100
|
onTouchstart
|
|
90
101
|
} = props;
|
|
91
102
|
|
|
92
|
-
if (loading || disabled) {
|
|
103
|
+
if (!onTouchstart || loading || disabled || pending.value) {
|
|
93
104
|
return;
|
|
94
105
|
}
|
|
95
106
|
|
|
96
|
-
onTouchstart
|
|
107
|
+
attemptAutoLoading(onTouchstart(e));
|
|
97
108
|
};
|
|
98
109
|
|
|
99
110
|
return {
|
|
111
|
+
pending,
|
|
100
112
|
handleClick,
|
|
101
113
|
handleTouchstart
|
|
102
114
|
};
|