stellar-ui-plus 1.25.0 → 1.25.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/components/ste-animate/ATTRIBUTES.md +13 -5
- package/components/ste-animate/README.md +4 -28
- package/components/ste-animate/ste-animate.easycom.json +31 -9
- package/components/ste-app-update/ATTRIBUTES.md +11 -5
- package/components/ste-app-update/README.md +1 -3
- package/components/ste-app-update/method.ts +44 -1
- package/components/ste-app-update/props.ts +17 -2
- package/components/ste-app-update/ste-app-update.easycom.json +18 -8
- package/components/ste-app-update/ste-app-update.vue +93 -18
- package/components/ste-area-chart/ATTRIBUTES.md +3 -1
- package/components/ste-area-chart/README.md +4 -4
- package/components/ste-badge/ATTRIBUTES.md +10 -1
- package/components/ste-badge/README.md +9 -18
- package/components/ste-badge/ste-badge.easycom.json +8 -0
- package/components/ste-bar-chart/ATTRIBUTES.md +3 -1
- package/components/ste-bar-chart/README.md +3 -5
- package/components/ste-barcode/ATTRIBUTES.md +6 -2
- package/components/ste-barcode/README.md +3 -5
- package/components/ste-barcode/ste-barcode.easycom.json +1 -2
- package/components/ste-button/ATTRIBUTES.md +24 -14
- package/components/ste-button/README.md +11 -19
- package/components/ste-button/ste-button.easycom.json +76 -12
- package/components/ste-calendar/ATTRIBUTES.md +12 -2
- package/components/ste-calendar/README.md +16 -24
- package/components/ste-calendar/ste-calendar.easycom.json +4 -3
- package/components/ste-category/ATTRIBUTES.md +6 -2
- package/components/ste-category/README.md +2 -4
- package/components/ste-category/ste-category.easycom.json +1 -2
- package/components/ste-checkbox/ATTRIBUTES.md +6 -2
- package/components/ste-checkbox/README.md +18 -20
- package/components/ste-checkbox/ste-checkbox.easycom.json +1 -3
- package/components/ste-checkbox/ste-checkbox.vue +71 -80
- package/components/ste-code-input/ATTRIBUTES.md +8 -4
- package/components/ste-code-input/README.md +7 -9
- package/components/ste-code-input/ste-code-input.easycom.json +13 -4
- package/components/ste-column-chart/ATTRIBUTES.md +3 -1
- package/components/ste-column-chart/README.md +5 -7
- package/components/ste-comment/ATTRIBUTES.md +3 -1
- package/components/ste-comment/README.md +2 -4
- package/components/ste-coupon-list/ATTRIBUTES.md +15 -5
- package/components/ste-coupon-list/README.md +6 -14
- package/components/ste-coupon-list/ste-coupon-list.easycom.json +22 -3
- package/components/ste-custom-keyboard/ATTRIBUTES.md +16 -7
- package/components/ste-custom-keyboard/README.md +10 -18
- package/components/ste-custom-keyboard/ste-custom-keyboard.easycom.json +28 -10
- package/components/ste-date-picker/ATTRIBUTES.md +9 -5
- package/components/ste-date-picker/README.md +9 -11
- package/components/ste-date-picker/ste-date-picker.easycom.json +19 -4
- package/components/ste-date-user/ATTRIBUTES.md +9 -1
- package/components/ste-date-user/README.md +3 -11
- package/components/ste-date-user/ste-date-user.easycom.json +4 -0
- package/components/ste-drag/ATTRIBUTES.md +13 -3
- package/components/ste-drag/README.md +5 -13
- package/components/ste-drag/ste-drag.easycom.json +10 -2
- package/components/ste-drag-sort/ATTRIBUTES.md +25 -0
- package/components/ste-drag-sort/README.md +116 -0
- package/components/ste-drag-sort/config.json +5 -0
- package/components/ste-drag-sort/props.ts +16 -0
- package/components/ste-drag-sort/ste-drag-sort.easycom.json +88 -0
- package/components/ste-drag-sort/ste-drag-sort.vue +589 -0
- package/components/ste-dropdown-menu/ATTRIBUTES.md +8 -4
- package/components/ste-dropdown-menu/README.md +14 -16
- package/components/ste-dropdown-menu/ste-dropdown-menu.easycom.json +13 -4
- package/components/ste-filter-tool/ATTRIBUTES.md +6 -2
- package/components/ste-filter-tool/README.md +4 -6
- package/components/ste-filter-tool/ste-filter-tool.easycom.json +1 -5
- package/components/ste-function-list/ATTRIBUTES.md +13 -2
- package/components/ste-function-list/README.md +3 -12
- package/components/ste-function-list/ste-function-list.easycom.json +8 -3
- package/components/ste-funnel-chart/ATTRIBUTES.md +3 -1
- package/components/ste-funnel-chart/README.md +4 -6
- package/components/ste-goods-info/ATTRIBUTES.md +15 -4
- package/components/ste-goods-info/README.md +8 -17
- package/components/ste-goods-info/ste-goods-info.easycom.json +40 -13
- package/components/ste-goods-list/ATTRIBUTES.md +9 -1
- package/components/ste-goods-list/README.md +4 -12
- package/components/ste-goods-list/ste-goods-list.easycom.json +4 -0
- package/components/ste-guide-qa/ATTRIBUTES.md +15 -4
- package/components/ste-guide-qa/README.md +6 -15
- package/components/ste-guide-qa/ste-guide-qa.easycom.json +20 -2
- package/components/ste-icon/ATTRIBUTES.md +7 -3
- package/components/ste-icon/README.md +5 -7
- package/components/ste-icon/ste-icon.easycom.json +7 -2
- package/components/ste-image/ATTRIBUTES.md +13 -2
- package/components/ste-image/README.md +6 -15
- package/components/ste-image/ste-image.easycom.json +8 -3
- package/components/ste-index-list/ATTRIBUTES.md +8 -4
- package/components/ste-index-list/README.md +6 -8
- package/components/ste-index-list/ste-index-list.easycom.json +13 -3
- package/components/ste-input/ATTRIBUTES.md +14 -3
- package/components/ste-input/README.md +16 -25
- package/components/ste-input/ste-input.easycom.json +14 -5
- package/components/ste-line-chart/ATTRIBUTES.md +3 -1
- package/components/ste-line-chart/README.md +5 -7
- package/components/ste-loading/ATTRIBUTES.md +3 -1
- package/components/ste-loading/README.md +6 -8
- package/components/ste-login/ATTRIBUTES.md +12 -2
- package/components/ste-login/README.md +7 -15
- package/components/ste-login/ste-login.easycom.json +4 -7
- package/components/ste-login-info/ATTRIBUTES.md +6 -2
- package/components/ste-login-info/README.md +2 -4
- package/components/ste-login-info/ste-login-info.easycom.json +1 -4
- package/components/ste-marquee/ATTRIBUTES.md +44 -0
- package/components/ste-marquee/README.md +123 -0
- package/components/ste-marquee/config.json +5 -0
- package/components/ste-marquee/props.ts +106 -0
- package/components/ste-marquee/ste-marquee.easycom.json +132 -0
- package/components/ste-marquee/ste-marquee.vue +249 -0
- package/components/ste-media-preview/ATTRIBUTES.md +14 -4
- package/components/ste-media-preview/README.md +23 -32
- package/components/ste-media-preview/ste-media-preview.easycom.json +16 -4
- package/components/ste-message-box/ATTRIBUTES.md +3 -1
- package/components/ste-message-box/README.md +11 -13
- package/components/ste-navbar/ATTRIBUTES.md +13 -3
- package/components/ste-navbar/README.md +5 -13
- package/components/ste-navbar/ste-navbar.easycom.json +10 -1
- package/components/ste-notice-bar/ATTRIBUTES.md +16 -5
- package/components/ste-notice-bar/README.md +11 -20
- package/components/ste-notice-bar/ste-notice-bar.easycom.json +26 -3
- package/components/ste-number-keyboard/ATTRIBUTES.md +17 -7
- package/components/ste-number-keyboard/README.md +9 -18
- package/components/ste-number-keyboard/ste-number-keyboard.easycom.json +32 -9
- package/components/ste-order-card/ATTRIBUTES.md +6 -2
- package/components/ste-order-card/README.md +4 -6
- package/components/ste-order-card/ste-order-card.easycom.json +1 -4
- package/components/ste-pie-chart/ATTRIBUTES.md +3 -1
- package/components/ste-pie-chart/README.md +4 -6
- package/components/ste-popup/ATTRIBUTES.md +15 -5
- package/components/ste-popup/README.md +10 -18
- package/components/ste-popup/ste-popup.easycom.json +22 -4
- package/components/ste-price/ATTRIBUTES.md +7 -3
- package/components/ste-price/README.md +10 -12
- package/components/ste-price/ste-price.easycom.json +7 -2
- package/components/ste-progress/ATTRIBUTES.md +9 -1
- package/components/ste-progress/README.md +9 -17
- package/components/ste-progress/ste-progress.easycom.json +4 -0
- package/components/ste-qrcode/ATTRIBUTES.md +6 -2
- package/components/ste-qrcode/README.md +4 -6
- package/components/ste-qrcode/ste-qrcode.easycom.json +1 -2
- package/components/ste-radio/ATTRIBUTES.md +6 -2
- package/components/ste-radio/README.md +17 -19
- package/components/ste-radio/ste-radio.easycom.json +1 -3
- package/components/ste-radio/ste-radio.vue +109 -85
- package/components/ste-rate/ATTRIBUTES.md +7 -3
- package/components/ste-rate/README.md +8 -10
- package/components/ste-rate/ste-rate.easycom.json +7 -2
- package/components/ste-read-more/ATTRIBUTES.md +20 -4
- package/components/ste-read-more/README.md +5 -19
- package/components/ste-read-more/ste-read-more.easycom.json +20 -2
- package/components/ste-rich-text/ATTRIBUTES.md +3 -1
- package/components/ste-rich-text/README.md +2 -4
- package/components/ste-ring-chart/ATTRIBUTES.md +3 -1
- package/components/ste-ring-chart/README.md +22 -5
- package/components/ste-ring-chart/ste-ring-chart.vue +40 -1
- package/components/ste-scroll-to/ATTRIBUTES.md +7 -3
- package/components/ste-scroll-to/README.md +2 -4
- package/components/ste-scroll-to/ste-scroll-to.easycom.json +7 -2
- package/components/ste-search/ATTRIBUTES.md +14 -3
- package/components/ste-search/README.md +12 -21
- package/components/ste-search/ste-search.easycom.json +14 -7
- package/components/ste-search-box/ATTRIBUTES.md +6 -2
- package/components/ste-search-box/README.md +3 -5
- package/components/ste-search-box/ste-search-box.easycom.json +1 -3
- package/components/ste-select/ATTRIBUTES.md +9 -5
- package/components/ste-select/README.md +11 -11
- package/components/ste-select/ste-select.easycom.json +19 -6
- package/components/ste-select-seat/ATTRIBUTES.md +8 -4
- package/components/ste-select-seat/README.md +7 -21
- package/components/ste-select-seat/ste-select-seat.easycom.json +13 -3
- package/components/ste-signature/ATTRIBUTES.md +18 -5
- package/components/ste-signature/README.md +3 -14
- package/components/ste-signature/ste-signature.easycom.json +50 -3
- package/components/ste-simple-calendar/ATTRIBUTES.md +16 -4
- package/components/ste-simple-calendar/README.md +8 -18
- package/components/ste-simple-calendar/ste-simple-calendar.easycom.json +30 -2
- package/components/ste-skeleton/ATTRIBUTES.md +9 -1
- package/components/ste-skeleton/README.md +5 -13
- package/components/ste-skeleton/ste-skeleton.easycom.json +4 -0
- package/components/ste-slide-verify/ATTRIBUTES.md +16 -5
- package/components/ste-slide-verify/README.md +7 -16
- package/components/ste-slide-verify/ste-slide-verify.easycom.json +26 -3
- package/components/ste-slider/ATTRIBUTES.md +14 -2
- package/components/ste-slider/README.md +12 -21
- package/components/ste-slider/ste-slider.easycom.json +12 -4
- package/components/ste-slider/ste-slider.vue +5 -3
- package/components/ste-stepper/ATTRIBUTES.md +9 -5
- package/components/ste-stepper/README.md +9 -13
- package/components/ste-stepper/ste-stepper.easycom.json +19 -6
- package/components/ste-steps/ATTRIBUTES.md +6 -2
- package/components/ste-steps/README.md +9 -11
- package/components/ste-steps/ste-steps.easycom.json +1 -2
- package/components/ste-sticky/ATTRIBUTES.md +8 -4
- package/components/ste-sticky/README.md +2 -4
- package/components/ste-sticky/ste-sticky.easycom.json +13 -3
- package/components/ste-swipe-action/ATTRIBUTES.md +14 -3
- package/components/ste-swipe-action/README.md +9 -18
- package/components/ste-swipe-action/ste-swipe-action.easycom.json +20 -2
- package/components/ste-swipe-action/useData.ts +15 -8
- package/components/ste-swipe-action-group/ATTRIBUTES.md +6 -2
- package/components/ste-swipe-action-group/ste-swipe-action-group.easycom.json +1 -3
- package/components/ste-swiper/ATTRIBUTES.md +6 -2
- package/components/ste-swiper/README.md +12 -14
- package/components/ste-swiper/ste-swiper.easycom.json +1 -3
- package/components/ste-switch/ATTRIBUTES.md +8 -4
- package/components/ste-switch/README.md +7 -9
- package/components/ste-switch/ste-switch.easycom.json +13 -3
- package/components/ste-tab/ATTRIBUTES.md +3 -1
- package/components/ste-table/ATTRIBUTES.md +12 -8
- package/components/ste-table/README.md +23 -23
- package/components/ste-table/ste-table.easycom.json +38 -9
- package/components/ste-tabs/ATTRIBUTES.md +9 -4
- package/components/ste-tabs/README.md +4 -6
- package/components/ste-tabs/props.ts +3 -0
- package/components/ste-tabs/ste-tabs.easycom.json +18 -2
- package/components/ste-tabs/useData.ts +1 -1
- package/components/ste-text/ATTRIBUTES.md +9 -1
- package/components/ste-text/README.md +4 -12
- package/components/ste-text/ste-text.easycom.json +4 -0
- package/components/ste-toast/ATTRIBUTES.md +10 -1
- package/components/ste-toast/README.md +9 -18
- package/components/ste-toast/ste-toast.easycom.json +14 -0
- package/components/ste-touch-swipe/ATTRIBUTES.md +6 -2
- package/components/ste-touch-swipe/README.md +4 -6
- package/components/ste-touch-swipe/ste-touch-swipe.easycom.json +1 -2
- package/components/ste-tour/ATTRIBUTES.md +7 -3
- package/components/ste-tour/README.md +5 -7
- package/components/ste-tour/ste-tour.easycom.json +11 -4
- package/components/ste-tree/ATTRIBUTES.md +15 -2
- package/components/ste-tree/README.md +6 -17
- package/components/ste-tree/ste-tree.easycom.json +16 -4
- package/components/ste-upload/ATTRIBUTES.md +17 -5
- package/components/ste-upload/README.md +9 -20
- package/components/ste-upload/ste-upload.easycom.json +36 -9
- package/components/ste-user-info/ATTRIBUTES.md +15 -5
- package/components/ste-user-info/README.md +5 -13
- package/components/ste-user-info/ste-user-info.easycom.json +22 -4
- package/components/ste-video/ATTRIBUTES.md +3 -1
- package/components/ste-video/README.md +4 -8
- package/components/ste-watermark/ATTRIBUTES.md +3 -1
- package/components/ste-watermark/README.md +5 -7
- package/config/font-size.ts +3 -0
- package/config/index.ts +5 -0
- package/index.ts +4 -0
- package/package.json +1 -1
- package/types/components.d.ts +4 -0
- package/types/refComponents.d.ts +4 -0
- package/utils/System.ts +50 -15
- package/utils/mixin.ts +4 -3
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `customClass` | 自定义class | `string` | - | - | - |
|
|
@@ -10,9 +12,20 @@
|
|
|
10
12
|
| `height` | 高度 | `string / number` | `100%` | - | - |
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
### Events
|
|
14
16
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
15
17
|
| ----- | ----- | ------- | -------- |
|
|
16
|
-
| `start` | 笔画开始时触发 |
|
|
17
|
-
| `signing` | 画图中触发 |
|
|
18
|
-
| `end` | 笔画结束时触发 |
|
|
18
|
+
| `start` | 笔画开始时触发 | `data`:() => void | - |
|
|
19
|
+
| `signing` | 画图中触发 | `data`:() => void | - |
|
|
20
|
+
| `end` | 笔画结束时触发 | `data`:() => void | - |
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Methods
|
|
24
|
+
| 方法名 | 说明 | 参数 | 返回值 | 支持版本 |
|
|
25
|
+
| ----- | ----- | --- | ------ | -------- |
|
|
26
|
+
| `clear` | 清空画布 | - | - | - |
|
|
27
|
+
| `back` | 回退 | - | - | - |
|
|
28
|
+
| `save` | 保存为图片 | `成功回调函数`:(base64)=>void<br/>`失败回调函数`:(err)=>void | - | - |
|
|
29
|
+
| `output` | 自定义输出 | `Options`:{orientation:string;success:(base64)=>void;fail:(err)=>void} | - | - |
|
|
30
|
+
|
|
31
|
+
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 基础使用
|
|
10
10
|
|
|
11
11
|
- `type` 签名保存图片类型,支持 `jpg` 和 `png`(默认) 两种格式。
|
|
12
12
|
- 此处使用 `jpg` 格式。因为媒体预览背景是黑色,画笔颜色是黑色,`png`格式图片时预览看不见
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</style>
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
## 画笔颜色和线宽
|
|
74
74
|
|
|
75
75
|
- 属性`strokeColor`可以自定义画笔颜色,默认`#000000`(黑色)
|
|
76
76
|
- 属性`lineWidth`可以自定义画笔线宽,默认`3`
|
|
@@ -83,18 +83,7 @@
|
|
|
83
83
|
|
|
84
84
|
---$
|
|
85
85
|
|
|
86
|
-
### API
|
|
87
|
-
|
|
88
86
|
<!-- props -->
|
|
89
87
|
|
|
90
|
-
#### 组件方法(Method)
|
|
91
|
-
|
|
92
|
-
| 方法名 | 说明 | 方法参数 | 支持版本 |
|
|
93
|
-
| -------- | ---------- | ------------------------------------------------------------ | -------- |
|
|
94
|
-
| `clear` | 清空画布 | - | - |
|
|
95
|
-
| `back` | 回退 | - | - |
|
|
96
|
-
| `save` | 保存为图片 | (base64)=>void,(err)=>void | - |
|
|
97
|
-
| `output` | 自定义输出 | {orientation:string;success:(base64)=>void;fail:(err)=>void} | `1.24.6` |
|
|
98
|
-
|
|
99
88
|
---$
|
|
100
89
|
{{xuyajun}}
|
|
@@ -58,17 +58,64 @@
|
|
|
58
58
|
{
|
|
59
59
|
"name": "[event]start",
|
|
60
60
|
"description": "笔画开始时触发",
|
|
61
|
-
"
|
|
61
|
+
"params": [
|
|
62
|
+
{
|
|
63
|
+
"name": "data",
|
|
64
|
+
"description": "() => void"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
62
67
|
},
|
|
63
68
|
{
|
|
64
69
|
"name": "[event]signing",
|
|
65
70
|
"description": "画图中触发",
|
|
66
|
-
"
|
|
71
|
+
"params": [
|
|
72
|
+
{
|
|
73
|
+
"name": "data",
|
|
74
|
+
"description": "() => void"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
67
77
|
},
|
|
68
78
|
{
|
|
69
79
|
"name": "[event]end",
|
|
70
80
|
"description": "笔画结束时触发",
|
|
71
|
-
"
|
|
81
|
+
"params": [
|
|
82
|
+
{
|
|
83
|
+
"name": "data",
|
|
84
|
+
"description": "() => void"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "[method]clear",
|
|
90
|
+
"description": "清空画布"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "[method]back",
|
|
94
|
+
"description": "回退"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "[method]save",
|
|
98
|
+
"description": "保存为图片",
|
|
99
|
+
"params": [
|
|
100
|
+
{
|
|
101
|
+
"name": "成功回调函数",
|
|
102
|
+
"description": "(base64)=>void"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "失败回调函数",
|
|
106
|
+
"description": "(err)=>void"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "[method]output",
|
|
112
|
+
"description": "自定义输出",
|
|
113
|
+
"params": [
|
|
114
|
+
{
|
|
115
|
+
"name": "Options",
|
|
116
|
+
"description": "{orientation:string;success:(base64)=>void;fail:(err)=>void}"
|
|
117
|
+
}
|
|
118
|
+
]
|
|
72
119
|
}
|
|
73
120
|
]
|
|
74
121
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `date` | 展示的日期 | `string / number / Date` | `Date.now()` | - | - |
|
|
@@ -10,8 +12,18 @@
|
|
|
10
12
|
| `customClass` | 自定义根节点 class | `string` | `` | - | - |
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
### Events
|
|
14
16
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
15
17
|
| ----- | ----- | ------- | -------- |
|
|
16
|
-
| `click` | 点击组件时触发 |
|
|
17
|
-
| `date-change` | 当 date 属性变化时触发 |
|
|
18
|
+
| `click` | 点击组件时触发 | `data`:(dateInfo: DateInfo) => void | - |
|
|
19
|
+
| `date-change` | 当 date 属性变化时触发 | `data`:(dateInfo: DateInfo) => void | - |
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Methods
|
|
23
|
+
| 方法名 | 说明 | 参数 | 返回值 | 支持版本 |
|
|
24
|
+
| ----- | ----- | --- | ------ | -------- |
|
|
25
|
+
| `setDate` | 设置当前展示日期 | `data`:number / string / Date | - | - |
|
|
26
|
+
| `getDateInfo` | 获取当前日期信息 | - | - | - |
|
|
27
|
+
| `today` | 重置为今天 | - | - | - |
|
|
28
|
+
|
|
29
|
+
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 基础使用
|
|
10
10
|
|
|
11
11
|
默认展示当前日期,点击组件后会弹出日历进行选择。
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## 指定日期
|
|
20
20
|
|
|
21
21
|
通过`date`属性设置展示日期,支持时间戳、日期字符串和`Date`对象。
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</template>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
## 禁用日历弹窗
|
|
30
30
|
|
|
31
31
|
- 通过`showCalendar`属性可以关闭内置日历弹窗
|
|
32
32
|
- 关闭后可结合`click`事件自行处理点击逻辑
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
## 自定义年月格式
|
|
47
47
|
|
|
48
48
|
通过`formatter`属性设置年月展示格式,格式规则与`dayjs`一致。
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
## 自定义星期文案
|
|
57
57
|
|
|
58
58
|
通过`weekTexts`属性设置星期显示内容。
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</template>
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
## 自定义颜色
|
|
67
67
|
|
|
68
68
|
通过`color`属性统一设置日期、星期和年月文字颜色。
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
</template>
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
## 调用实例方法
|
|
77
77
|
|
|
78
78
|
通过`ref`可以调用组件暴露的方法,例如重置为今天。
|
|
79
79
|
|
|
@@ -96,17 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
---$
|
|
98
98
|
|
|
99
|
-
### API
|
|
100
|
-
|
|
101
99
|
<!-- props -->
|
|
102
100
|
|
|
103
|
-
#### Methods
|
|
104
|
-
|
|
105
|
-
| 方法名 | 说明 | 方法参数 | 支持版本 |
|
|
106
|
-
| ------------- | ---------------- | -------------------------- | -------- |
|
|
107
|
-
| `setDate` | 设置当前展示日期 | `string \| number \| Date` | - |
|
|
108
|
-
| `getDateInfo` | 获取当前日期信息 | - | - |
|
|
109
|
-
| `today` | 重置为今天 | - | - |
|
|
110
|
-
|
|
111
101
|
---$
|
|
112
102
|
{{fuyuwei}}
|
|
@@ -49,12 +49,40 @@
|
|
|
49
49
|
{
|
|
50
50
|
"name": "[event]click",
|
|
51
51
|
"description": "点击组件时触发",
|
|
52
|
-
"
|
|
52
|
+
"params": [
|
|
53
|
+
{
|
|
54
|
+
"name": "data",
|
|
55
|
+
"description": "(dateInfo: DateInfo) => void"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
53
58
|
},
|
|
54
59
|
{
|
|
55
60
|
"name": "[event]date-change",
|
|
56
61
|
"description": "当 date 属性变化时触发",
|
|
57
|
-
"
|
|
62
|
+
"params": [
|
|
63
|
+
{
|
|
64
|
+
"name": "data",
|
|
65
|
+
"description": "(dateInfo: DateInfo) => void"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "[method]setDate",
|
|
71
|
+
"description": "设置当前展示日期",
|
|
72
|
+
"params": [
|
|
73
|
+
{
|
|
74
|
+
"name": "data",
|
|
75
|
+
"description": "number / string / Date"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "[method]getDateInfo",
|
|
81
|
+
"description": "获取当前日期信息"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "[method]today",
|
|
85
|
+
"description": "重置为今天"
|
|
58
86
|
}
|
|
59
87
|
]
|
|
60
88
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `loading` | 是否显示骨架图 | `boolean` | `true` | - | - |
|
|
5
7
|
| `type` | 骨架图类型 | `string` | `text` | `text`:文本<br/>`image`:图片<br/>`circle`:圆形<br/>`button`:按钮 | - |
|
|
6
8
|
|
|
7
9
|
|
|
10
|
+
### Slots
|
|
11
|
+
| 插槽名 | 说明 | 参数 | 支持版本 |
|
|
12
|
+
| ----- | ----- | --- | -------- |
|
|
13
|
+
| `default` | 默认插槽 | - | - |
|
|
14
|
+
|
|
15
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
9
|
JavaScript后面的演示代码中涉及到的变量和方法都使用本`javascript`代码
|
|
10
10
|
|
|
@@ -19,11 +19,11 @@ onMounted(() => {
|
|
|
19
19
|
});
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
## 骨架类型
|
|
23
23
|
|
|
24
24
|
通过`type`属性,设置骨架图类型
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
###### 基础文本骨架
|
|
27
27
|
|
|
28
28
|
最简单的文本内容骨架图用法
|
|
29
29
|
|
|
@@ -41,7 +41,7 @@ onMounted(() => {
|
|
|
41
41
|
</template>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
###### 图片骨架
|
|
45
45
|
|
|
46
46
|
适用于矩形图片的骨架展示:
|
|
47
47
|
|
|
@@ -53,7 +53,7 @@ onMounted(() => {
|
|
|
53
53
|
</template>
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
###### 圆形头像骨架
|
|
57
57
|
|
|
58
58
|
适用于圆形头像或图标的骨架展示:
|
|
59
59
|
|
|
@@ -67,16 +67,8 @@ onMounted(() => {
|
|
|
67
67
|
|
|
68
68
|
---$
|
|
69
69
|
|
|
70
|
-
### API
|
|
71
|
-
|
|
72
70
|
<!-- props -->
|
|
73
71
|
|
|
74
|
-
#### 组件插槽(Slots)
|
|
75
|
-
|
|
76
|
-
| 名称 | 说明 | 支持版本 |
|
|
77
|
-
| ------- | -------- | -------- |
|
|
78
|
-
| default | 默认插槽 | - |
|
|
79
|
-
|
|
80
72
|
---$
|
|
81
73
|
|
|
82
74
|
{{qinpengfei}}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `modelValue` | 验证状态(支持 v-model 双向绑定) | `Boolean` | `false` | - | - |
|
|
@@ -19,9 +21,18 @@
|
|
|
19
21
|
| `failColor` | 失败态颜色 | `String` | `#ee0a24` | - | - |
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
### Events
|
|
23
25
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
24
26
|
| ----- | ----- | ------- | -------- |
|
|
25
|
-
| `change` | 拖动过程中实时触发 |
|
|
26
|
-
| `success` | 验证成功时触发 |
|
|
27
|
-
| `fail` | 验证失败时触发 |
|
|
27
|
+
| `change` | 拖动过程中实时触发 | `data`:(detail) => void | - |
|
|
28
|
+
| `success` | 验证成功时触发 | `data`:(detail) => void | - |
|
|
29
|
+
| `fail` | 验证失败时触发 | `data`:(detail) => void | - |
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Methods
|
|
33
|
+
| 方法名 | 说明 | 参数 | 返回值 | 支持版本 |
|
|
34
|
+
| ----- | ----- | --- | ------ | -------- |
|
|
35
|
+
| `init` | 重新计算轨道宽度并同步状态 | - | - | - |
|
|
36
|
+
| `reset` | 重置验证状态 | - | - | - |
|
|
37
|
+
|
|
38
|
+
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 基础用法
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
12
|
<script setup lang="ts">
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
## 没有错误提示
|
|
23
23
|
|
|
24
24
|
```html
|
|
25
25
|
<script setup lang="ts">
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
## 转动图片
|
|
36
36
|
|
|
37
37
|
```html
|
|
38
38
|
<script setup lang="ts">
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
</template>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
## 禁用状态
|
|
49
49
|
|
|
50
50
|
```html
|
|
51
51
|
<template>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
## 失败态停留更久
|
|
57
57
|
|
|
58
58
|
```html
|
|
59
59
|
<script setup lang="ts">
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
</template>
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
## 尺寸、颜色与文案
|
|
70
70
|
|
|
71
71
|
```html
|
|
72
72
|
<script setup lang="ts">
|
|
@@ -91,17 +91,8 @@
|
|
|
91
91
|
|
|
92
92
|
---$
|
|
93
93
|
|
|
94
|
-
### API
|
|
95
|
-
|
|
96
94
|
<!-- props -->
|
|
97
95
|
|
|
98
|
-
#### Methods
|
|
99
|
-
|
|
100
|
-
| 方法名 | 说明 | 参数 |
|
|
101
|
-
| ------- | -------------------------- | ---- |
|
|
102
|
-
| `init` | 重新计算轨道宽度并同步状态 | - |
|
|
103
|
-
| `reset` | 重置验证状态 | - |
|
|
104
|
-
|
|
105
96
|
`detail` 数据结构:
|
|
106
97
|
|
|
107
98
|
```ts
|
|
@@ -103,17 +103,40 @@
|
|
|
103
103
|
{
|
|
104
104
|
"name": "[event]change",
|
|
105
105
|
"description": "拖动过程中实时触发",
|
|
106
|
-
"
|
|
106
|
+
"params": [
|
|
107
|
+
{
|
|
108
|
+
"name": "data",
|
|
109
|
+
"description": "(detail) => void"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
107
112
|
},
|
|
108
113
|
{
|
|
109
114
|
"name": "[event]success",
|
|
110
115
|
"description": "验证成功时触发",
|
|
111
|
-
"
|
|
116
|
+
"params": [
|
|
117
|
+
{
|
|
118
|
+
"name": "data",
|
|
119
|
+
"description": "(detail) => void"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
112
122
|
},
|
|
113
123
|
{
|
|
114
124
|
"name": "[event]fail",
|
|
115
125
|
"description": "验证失败时触发",
|
|
116
|
-
"
|
|
126
|
+
"params": [
|
|
127
|
+
{
|
|
128
|
+
"name": "data",
|
|
129
|
+
"description": "(detail) => void"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "[method]init",
|
|
135
|
+
"description": "重新计算轨道宽度并同步状态"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "[method]reset",
|
|
139
|
+
"description": "重置验证状态"
|
|
117
140
|
}
|
|
118
141
|
]
|
|
119
142
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `value` | 滑块选择值,在双滑块模式下为数组格式(数组的值都是从小到大) | `number / string / array` | - | - | - |
|
|
@@ -16,10 +18,20 @@
|
|
|
16
18
|
| `marks` | 标记,key 的类型必须为 number 且取值在闭区间 [min, max] 内,每个标记可以单独设置样式 | `object` | - | - | - |
|
|
17
19
|
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
### Events
|
|
20
22
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
21
23
|
| ----- | ----- | ------- | -------- |
|
|
22
24
|
| `change` | 进度变化且结束拖动后触发 | `percentage`:当前滑块值 | - |
|
|
23
25
|
| `dragStart` | 开始拖动时触发 | `e`:拖动事件 | - |
|
|
24
26
|
| `dragEnd` | 结束拖动时触发 | `e`:拖动事件 | - |
|
|
25
27
|
| `input` | 进度变化时实时触发 | `percentage`:进度百分比 | - |
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Slots
|
|
31
|
+
| 插槽名 | 说明 | 参数 | 支持版本 |
|
|
32
|
+
| ----- | ----- | --- | -------- |
|
|
33
|
+
| `button` | 自定义滑块按钮 | - | - |
|
|
34
|
+
| `leftButton` | 自定义左侧滑块按钮(范围选择下) | - | - |
|
|
35
|
+
| `rightButton` | 自定义右侧滑块按钮(范围选择下) | - | - |
|
|
36
|
+
|
|
37
|
+
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Slider 滑块
|
|
2
2
|
|
|
3
3
|
该组件一般用于表单中,手动选择一个区间范围的场景
|
|
4
|
+
注意:在弹窗等初始隐藏的场景中使用时,组件显示后需通过 v-if 重新加载以计算宽度。
|
|
4
5
|
|
|
5
6
|
---$
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
## 代码演示
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## 基础使用
|
|
10
11
|
|
|
11
12
|
```html
|
|
12
13
|
<template>
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
</template>
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
## 滑块条高度 & 滑块大小
|
|
18
19
|
|
|
19
20
|
```html
|
|
20
21
|
<template>
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
</template>
|
|
24
25
|
```
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
## 进度条颜色
|
|
27
28
|
|
|
28
29
|
```html
|
|
29
30
|
<template>
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
</template>
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
## 范围选择
|
|
35
36
|
|
|
36
37
|
```html
|
|
37
38
|
<template>
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
</template>
|
|
40
41
|
```
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
## 竖向
|
|
43
44
|
|
|
44
45
|
```html
|
|
45
46
|
<template>
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
</template>
|
|
48
49
|
```
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
## 禁用
|
|
51
52
|
|
|
52
53
|
```html
|
|
53
54
|
<template>
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
</template>
|
|
56
57
|
```
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
## 只读
|
|
59
60
|
|
|
60
61
|
```html
|
|
61
62
|
<template>
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
</template>
|
|
64
65
|
```
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
## 间断点
|
|
67
68
|
|
|
68
69
|
当`showStops`为`true`时,会根据最大值(`max`)、最小值(`min`)、步长(`step`)来显示间断点
|
|
69
70
|
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
</template>
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
## 标记
|
|
77
78
|
|
|
78
79
|
当同时配置了`showStops`属性和`marks`属性时,会显示自定义节点
|
|
79
80
|
|
|
@@ -97,7 +98,7 @@
|
|
|
97
98
|
</template>
|
|
98
99
|
```
|
|
99
100
|
|
|
100
|
-
|
|
101
|
+
## 自定义滑块
|
|
101
102
|
|
|
102
103
|
```html
|
|
103
104
|
<template>
|
|
@@ -152,17 +153,7 @@
|
|
|
152
153
|
|
|
153
154
|
---$
|
|
154
155
|
|
|
155
|
-
### API
|
|
156
|
-
|
|
157
156
|
<!-- props -->
|
|
158
157
|
|
|
159
|
-
#### 组件插槽(Slots)
|
|
160
|
-
|
|
161
|
-
| 插槽名 | 说明 | 插槽参数 | 支持版本 |
|
|
162
|
-
| ------------- | -------------------------------- | -------- | -------- |
|
|
163
|
-
| `button` | 自定义滑块按钮 | - | - |
|
|
164
|
-
| `leftButton` | 自定义左侧滑块按钮(范围选择下) | - | - |
|
|
165
|
-
| `rightButton` | 自定义右侧滑块按钮(范围选择下) | - | - |
|
|
166
|
-
|
|
167
158
|
---$
|
|
168
159
|
{{fuyuwei}}
|