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
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
{
|
|
84
84
|
"name": "[event]change",
|
|
85
85
|
"description": "进度变化且结束拖动后触发",
|
|
86
|
-
"type": "(percentage)=>void",
|
|
87
86
|
"params": [
|
|
88
87
|
{
|
|
89
88
|
"name": "percentage",
|
|
@@ -94,7 +93,6 @@
|
|
|
94
93
|
{
|
|
95
94
|
"name": "[event]dragStart",
|
|
96
95
|
"description": "开始拖动时触发",
|
|
97
|
-
"type": "(e)=>void",
|
|
98
96
|
"params": [
|
|
99
97
|
{
|
|
100
98
|
"name": "e",
|
|
@@ -105,7 +103,6 @@
|
|
|
105
103
|
{
|
|
106
104
|
"name": "[event]dragEnd",
|
|
107
105
|
"description": "结束拖动时触发",
|
|
108
|
-
"type": "(e)=>void",
|
|
109
106
|
"params": [
|
|
110
107
|
{
|
|
111
108
|
"name": "e",
|
|
@@ -116,13 +113,24 @@
|
|
|
116
113
|
{
|
|
117
114
|
"name": "[event]input",
|
|
118
115
|
"description": "进度变化时实时触发",
|
|
119
|
-
"type": "(percentage)=>void",
|
|
120
116
|
"params": [
|
|
121
117
|
{
|
|
122
118
|
"name": "percentage",
|
|
123
119
|
"description": "进度百分比"
|
|
124
120
|
}
|
|
125
121
|
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "[slot]button",
|
|
125
|
+
"description": "自定义滑块按钮"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "[slot]leftButton",
|
|
129
|
+
"description": "自定义左侧滑块按钮(范围选择下)"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "[slot]rightButton",
|
|
133
|
+
"description": "自定义右侧滑块按钮(范围选择下)"
|
|
126
134
|
}
|
|
127
135
|
]
|
|
128
136
|
}
|
|
@@ -97,9 +97,11 @@ const cmpActiveStyle = computed(() => {
|
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
onMounted(() => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
setTimeout(() => {
|
|
101
|
+
handleWindowResize();
|
|
102
|
+
uni.onWindowResize(handleWindowResize);
|
|
103
|
+
calculateStepMarks();
|
|
104
|
+
}, 50);
|
|
103
105
|
});
|
|
104
106
|
|
|
105
107
|
onBeforeUnmount(() => {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `v-model` | 当前输入的值 | `number` | `1` | - | - |
|
|
@@ -24,11 +26,13 @@
|
|
|
24
26
|
| `badgeMax` | 徽标:徽标最大显示值 | `number` | `99` | - | - |
|
|
25
27
|
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
### Events
|
|
28
30
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
29
31
|
| ----- | ----- | ------- | -------- |
|
|
30
|
-
| `change` | 当绑定值变化时触发的事件 `value`: 改变后的绑定值 |
|
|
32
|
+
| `change` | 当绑定值变化时触发的事件 `value`: 改变后的绑定值 | `data`:(value: number) => void | - |
|
|
31
33
|
| `plus` | 点击增加按钮时触发(可拦截change事件) | `value`:改变后的绑定值<br/>`suspend`:等待<br/>`next`:继续<br/>`stop`:停止 | - |
|
|
32
34
|
| `minus` | 点击减少按钮时触发(可拦截change事件) | `value`:改变后的绑定值<br/>`suspend`:等待<br/>`next`:继续<br/>`stop`:停止 | - |
|
|
33
|
-
| `focus` | 输入框聚焦时触发 |
|
|
34
|
-
| `blur` | 输入框失焦时触发 |
|
|
35
|
+
| `focus` | 输入框聚焦时触发 | `data`:() => void | - |
|
|
36
|
+
| `blur` | 输入框失焦时触发 | `data`:() => void | - |
|
|
37
|
+
|
|
38
|
+
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 基础用法
|
|
10
10
|
|
|
11
11
|
通过`value`属性,双向绑定,设置输入值
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## 限制输入范围
|
|
24
24
|
|
|
25
25
|
通过 `min` 和 `max` 属性限制输入值的范围,默认超出范围后会自动校正最大值(默认值:`Infinity`)或最小值(默认值:`0`)
|
|
26
26
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
## 步长设置
|
|
38
38
|
|
|
39
39
|
通过 `step` 属性设置每次点击增加或减少按钮时变化的值,默认为 1。
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</template>
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
## 数值精度
|
|
52
52
|
|
|
53
53
|
通过 `precision` 属性设置输入值的小数位,默认为 1。
|
|
54
54
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</template>
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
## 自定义大小
|
|
66
66
|
|
|
67
67
|
通过 `inputWidth` 属性设置输入框宽度,通过 `buttonSize` 属性设置按钮大小和输入框高度。
|
|
68
68
|
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
</template>
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
## 主色
|
|
80
80
|
|
|
81
81
|
通过 `mainColor` 属性设置步进器的主色,对`theme`为`line`时无效。
|
|
82
82
|
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
</template>
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
## 禁用
|
|
94
94
|
|
|
95
95
|
- 通过 `disabled` 属性设置禁用步进器,默认为 `false`。
|
|
96
96
|
- 通过 `disablePlus` 属性设置禁用增加按钮,默认为 `false`。
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
</template>
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
## 样式风格:线性风格
|
|
117
117
|
|
|
118
118
|
通过 `theme` 属性设置步进器的样式风格,设置为线性 `line`,默认为 `card`。
|
|
119
119
|
|
|
@@ -137,10 +137,6 @@
|
|
|
137
137
|
|
|
138
138
|
---$
|
|
139
139
|
|
|
140
|
-
### API
|
|
141
|
-
|
|
142
|
-
#### 组件属性(Props)
|
|
143
|
-
|
|
144
140
|
<!-- props -->
|
|
145
141
|
|
|
146
142
|
---$
|
|
@@ -172,12 +172,16 @@
|
|
|
172
172
|
{
|
|
173
173
|
"name": "[event]change",
|
|
174
174
|
"description": "当绑定值变化时触发的事件 `value`: 改变后的绑定值",
|
|
175
|
-
"
|
|
175
|
+
"params": [
|
|
176
|
+
{
|
|
177
|
+
"name": "data",
|
|
178
|
+
"description": "(value: number) => void"
|
|
179
|
+
}
|
|
180
|
+
]
|
|
176
181
|
},
|
|
177
182
|
{
|
|
178
183
|
"name": "[event]plus",
|
|
179
184
|
"description": "点击增加按钮时触发(可拦截change事件)",
|
|
180
|
-
"type": "(value: number,suspend: ()=>void,next: ()=>void,stop: ()=>void) => void",
|
|
181
185
|
"params": [
|
|
182
186
|
{
|
|
183
187
|
"name": "value",
|
|
@@ -200,7 +204,6 @@
|
|
|
200
204
|
{
|
|
201
205
|
"name": "[event]minus",
|
|
202
206
|
"description": "点击减少按钮时触发(可拦截change事件)",
|
|
203
|
-
"type": "(value:string | number,suspend: ()=>void,next: ()=>void,stop: ()=>void) => void",
|
|
204
207
|
"params": [
|
|
205
208
|
{
|
|
206
209
|
"name": "value",
|
|
@@ -223,12 +226,22 @@
|
|
|
223
226
|
{
|
|
224
227
|
"name": "[event]focus",
|
|
225
228
|
"description": "输入框聚焦时触发",
|
|
226
|
-
"
|
|
229
|
+
"params": [
|
|
230
|
+
{
|
|
231
|
+
"name": "data",
|
|
232
|
+
"description": "() => void"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
227
235
|
},
|
|
228
236
|
{
|
|
229
237
|
"name": "[event]blur",
|
|
230
238
|
"description": "输入框失焦时触发",
|
|
231
|
-
"
|
|
239
|
+
"params": [
|
|
240
|
+
{
|
|
241
|
+
"name": "data",
|
|
242
|
+
"description": "() => void"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
232
245
|
}
|
|
233
246
|
]
|
|
234
|
-
}
|
|
247
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `active` | 步骤进度 | `number` | `0` | - | - |
|
|
@@ -8,7 +10,9 @@
|
|
|
8
10
|
| `lineStyle` | 线条样式(支持border-style全部属性) | `string` | `solid` | - | `1.22.27` |
|
|
9
11
|
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
### Events
|
|
12
14
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
13
15
|
| ----- | ----- | ------- | -------- |
|
|
14
16
|
| `clickStep` | 点击步骤的标题或图标时触发 | `index`:点击的步骤序号 | - |
|
|
17
|
+
|
|
18
|
+
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
9
|
后面的演示代码中涉及到的变量和方法都使用该代码
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## 基础用法
|
|
12
12
|
|
|
13
13
|
`active` 为步骤进度,为 `Number` 类型,步骤的下标。
|
|
14
14
|
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
</template>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
## 设置标题和描述信息
|
|
37
37
|
|
|
38
38
|
可以通过 `title` 和 `description` 设置步骤的标题和描述信息。如果不设置标题,则会使用默认的文案。
|
|
39
39
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
## 修改图标
|
|
56
56
|
|
|
57
57
|
- 可以通过 `icon` 属性设置步骤的图标,传入图标的名称,也可以通过 `icon` 的 slot 插槽自定义图标
|
|
58
58
|
- 优先级:插槽 > 点状 > icon属性 > 默认图标
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
</template>
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
## 竖向步骤条
|
|
80
80
|
|
|
81
81
|
可以通过 `direction` 属性设置步骤条方向,`row`:横向,`column`:竖向,默认为`row`
|
|
82
82
|
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
</template>
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
## 点状步骤和垂直方向
|
|
101
101
|
|
|
102
102
|
可以通过 `dot` 属性设置点状步骤条
|
|
103
103
|
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
</template>
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
## 修改状态
|
|
122
122
|
|
|
123
123
|
设置 `status`,支持 `finished`(完成)、`process`(进行中)、`error`(失败) 三种状态。
|
|
124
124
|
|
|
@@ -139,11 +139,9 @@
|
|
|
139
139
|
|
|
140
140
|
---$
|
|
141
141
|
|
|
142
|
-
### API
|
|
143
|
-
|
|
144
142
|
<!-- props -->
|
|
145
143
|
|
|
146
|
-
|
|
144
|
+
## Step组件属性(Props)
|
|
147
145
|
|
|
148
146
|
| 参数 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
149
147
|
| ------------- | ------------------------------------ | -------- | ------ | ------ | -------- |
|
|
@@ -152,7 +150,7 @@
|
|
|
152
150
|
| `icon` | 图标 | `String` | - | - | - |
|
|
153
151
|
| `status` | 步骤状态 | `String` | - | - | - |
|
|
154
152
|
|
|
155
|
-
|
|
153
|
+
## Step Slots
|
|
156
154
|
|
|
157
155
|
| 插槽名 | 说明 | 插槽参数 | 支持版本 |
|
|
158
156
|
| --------- | -------- | -------- | -------- |
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `offsetTop` | 吸顶时与顶部的距离,单位rpx | `string / number` | `0` | - | - |
|
|
@@ -8,8 +10,10 @@
|
|
|
8
10
|
| `zIndex` | 吸顶时的z-index值 | `string / number` | `98` | - | - |
|
|
9
11
|
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
### Events
|
|
12
14
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
13
15
|
| ----- | ----- | ------- | -------- |
|
|
14
|
-
| `fixed` | 组件吸顶时触发 |
|
|
15
|
-
| `unfixed` | 组件取消吸顶时触发 |
|
|
16
|
+
| `fixed` | 组件吸顶时触发 | `data`:() => void | - |
|
|
17
|
+
| `unfixed` | 组件取消吸顶时触发 | `data`:() => void | - |
|
|
18
|
+
|
|
19
|
+
|
|
@@ -37,12 +37,22 @@
|
|
|
37
37
|
{
|
|
38
38
|
"name": "[event]fixed",
|
|
39
39
|
"description": "组件吸顶时触发",
|
|
40
|
-
"
|
|
40
|
+
"params": [
|
|
41
|
+
{
|
|
42
|
+
"name": "data",
|
|
43
|
+
"description": "() => void"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
41
46
|
},
|
|
42
47
|
{
|
|
43
48
|
"name": "[event]unfixed",
|
|
44
49
|
"description": "组件取消吸顶时触发",
|
|
45
|
-
"
|
|
50
|
+
"params": [
|
|
51
|
+
{
|
|
52
|
+
"name": "data",
|
|
53
|
+
"description": "() => void"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
46
56
|
}
|
|
47
57
|
]
|
|
48
|
-
}
|
|
58
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `mode` | 模式 | `string` | `right` | `right`:右滑(默认)<br/>`left`:左滑<br/>`all`:左右滑 | - |
|
|
@@ -9,8 +11,17 @@
|
|
|
9
11
|
| `rightIcon` | 是否显示右侧图标 | `boolean` | `false` | - | - |
|
|
10
12
|
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
### Events
|
|
13
15
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
14
16
|
| ----- | ----- | ------- | -------- |
|
|
15
17
|
| `open` | 打开滑块时触发,参数为方向 | `direction`:方向(值为left或right) | - |
|
|
16
|
-
| `close` | 关闭滑块时触发 |
|
|
18
|
+
| `close` | 关闭滑块时触发 | `data`:()=>void | - |
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Methods
|
|
22
|
+
| 方法名 | 说明 | 参数 | 返回值 | 支持版本 |
|
|
23
|
+
| ----- | ----- | --- | ------ | -------- |
|
|
24
|
+
| `open` | 打开滑块,参数为方向 | `direction`:left / right:需要打开的方向,默认同 mode | - | - |
|
|
25
|
+
| `close` | 关闭滑块 | - | - | - |
|
|
26
|
+
|
|
27
|
+
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
---$
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## 代码演示
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## 基础用法
|
|
11
11
|
|
|
12
12
|
- 插槽`default`为单元格内容区域
|
|
13
13
|
- 插槽`right`为单元格右侧内容区域
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
</style>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
## 调用方法打开或关闭
|
|
42
42
|
|
|
43
43
|
- 方法`open`可打开单元格
|
|
44
44
|
- 参数为需要打开的方向(默认同mode)
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
</style>
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
## 滑动方向、开关按钮
|
|
86
86
|
|
|
87
87
|
- 属性`mode`可以设置滑动方向,默认为`right`,可选值为`left`、`all`
|
|
88
88
|
- 属性`leftIcon`和`rightIcon`可以设置是否显示开关按钮
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
</style>
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
## 单元格组
|
|
139
139
|
|
|
140
140
|
- 标签`ste-swipe-action-group`用于包裹多个单元格
|
|
141
141
|
- 事件`open`监听组内单元格的开启
|
|
@@ -202,20 +202,11 @@
|
|
|
202
202
|
|
|
203
203
|
---$
|
|
204
204
|
|
|
205
|
-
### SwipeAction API
|
|
206
|
-
|
|
207
205
|
<!-- props -->
|
|
208
206
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
| 方法名 | 说明 | 方法参数 | 支持版本 |
|
|
212
|
-
| ------- | -------------------- | -------------------------------------------- | -------- |
|
|
213
|
-
| `open` | 打开滑块,参数为方向 | `left`/`right`:需要打开的方向,默认同`mode` | - |
|
|
214
|
-
| `close` | 关闭滑块 | - | - |
|
|
215
|
-
|
|
216
|
-
### SwipeActionGroup API
|
|
207
|
+
## SwipeActionGroup API
|
|
217
208
|
|
|
218
|
-
|
|
209
|
+
### Props
|
|
219
210
|
|
|
220
211
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
221
212
|
| ---------------- | ------------------------------------------- | ----------------- | ------- | ---------------------------------------------------------- | -------- |
|
|
@@ -227,14 +218,14 @@
|
|
|
227
218
|
| `leftIcon` | 是否显示左侧图标 | `Boolean` | `false` | - | - |
|
|
228
219
|
| `rightIcon` | 是否显示右侧图标 | `Boolean` | `false` | - | - |
|
|
229
220
|
|
|
230
|
-
|
|
221
|
+
### Events
|
|
231
222
|
|
|
232
223
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
233
224
|
| ------- | -------------- | ---------------------------------------------- | -------- |
|
|
234
225
|
| `open` | 打开滑块时触发 | `left`/`right`:打开的方向,`index`:打开的下标 | - |
|
|
235
226
|
| `close` | 关闭滑块时触发 | - | - |
|
|
236
227
|
|
|
237
|
-
|
|
228
|
+
### Method
|
|
238
229
|
|
|
239
230
|
| 方法名 | 说明 | 方法参数 | 支持版本 |
|
|
240
231
|
| ------- | -------- | ----------------------------------------------------------------------- | -------- |
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
{
|
|
58
58
|
"name": "[event]open",
|
|
59
59
|
"description": "打开滑块时触发,参数为方向",
|
|
60
|
-
"type": "(d:string)=>void",
|
|
61
60
|
"params": [
|
|
62
61
|
{
|
|
63
62
|
"name": "direction",
|
|
@@ -68,7 +67,26 @@
|
|
|
68
67
|
{
|
|
69
68
|
"name": "[event]close",
|
|
70
69
|
"description": "关闭滑块时触发",
|
|
71
|
-
"
|
|
70
|
+
"params": [
|
|
71
|
+
{
|
|
72
|
+
"name": "data",
|
|
73
|
+
"description": "()=>void"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "[method]open",
|
|
79
|
+
"description": "打开滑块,参数为方向",
|
|
80
|
+
"params": [
|
|
81
|
+
{
|
|
82
|
+
"name": "direction",
|
|
83
|
+
"description": "left / right:需要打开的方向,默认同 mode"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "[method]close",
|
|
89
|
+
"description": "关闭滑块"
|
|
72
90
|
}
|
|
73
91
|
]
|
|
74
92
|
}
|
|
@@ -44,21 +44,28 @@ export default function useData({ props, parent, thas, emits }: {
|
|
|
44
44
|
changeCallback.value = val
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
// 获取配置值:优先使用自己的值,其次使用父组件的值,最后使用默认值
|
|
48
|
+
const getDefaultData = <T,>(selfValue: T | null | undefined, parentValue: T | undefined, defaultValue: T): T => {
|
|
49
|
+
if (selfValue !== null && selfValue !== undefined) return selfValue;
|
|
50
|
+
if (parentValue !== undefined) return parentValue;
|
|
51
|
+
return defaultValue;
|
|
52
|
+
};
|
|
48
53
|
|
|
49
|
-
const
|
|
54
|
+
const cmpMode = computed<ModeType>(() => getDefaultData(props.mode, parent?.props?.mode, 'right'));
|
|
50
55
|
|
|
51
|
-
const
|
|
56
|
+
const cmpLeft = computed(() => ['all', 'left'].includes(cmpMode.value));
|
|
52
57
|
|
|
53
|
-
const
|
|
58
|
+
const cmpRight = computed(() => ['all', 'right'].includes(cmpMode.value));
|
|
54
59
|
|
|
55
|
-
const
|
|
60
|
+
const cmpDisabled = computed<boolean>(() => getDefaultData(props.disabled, parent?.props?.disabled, false));
|
|
56
61
|
|
|
57
|
-
const
|
|
62
|
+
const cmpSwipeThreshold = computed<number>(() => getDefaultData(props.swipeThreshold, parent?.props?.swipeThreshold, 0.35));
|
|
58
63
|
|
|
59
|
-
const
|
|
64
|
+
const cmpDuration = computed<number>(() => getDefaultData(props.duration, parent?.props?.duration, 300));
|
|
60
65
|
|
|
61
|
-
const
|
|
66
|
+
const cmpLeftIcon = computed<boolean>(() => getDefaultData(props.leftIcon, parent?.props?.leftIcon, false));
|
|
67
|
+
|
|
68
|
+
const cmpRightIcon = computed<boolean>(() => getDefaultData(props.rightIcon, parent?.props?.rightIcon, false));
|
|
62
69
|
|
|
63
70
|
const cmpTransform = computed<StyleValue>(() => ({
|
|
64
71
|
transform: `translateX(${translateX.value}px)`,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `mode` | 模式 | `string` | `right` | `right`:右滑(默认)<br/>`left`:左滑<br/>`all`:左右滑 | - |
|
|
@@ -10,8 +12,10 @@
|
|
|
10
12
|
| `rightIcon` | 是否显示右侧图标 | `boolean` | `false` | - | - |
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
### Events
|
|
14
16
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
15
17
|
| ----- | ----- | ------- | -------- |
|
|
16
18
|
| `open` | 打开滑块时触发,参数为方向 | `direction`:方向(值为left或right)<br/>`index`:当前单元格索引 | - |
|
|
17
19
|
| `close` | 关闭滑块时触发 | `index`:当前单元格索引 | - |
|
|
20
|
+
|
|
21
|
+
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
{
|
|
64
64
|
"name": "[event]open",
|
|
65
65
|
"description": "打开滑块时触发,参数为方向",
|
|
66
|
-
"type": "(d:string,index:number)=>void",
|
|
67
66
|
"params": [
|
|
68
67
|
{
|
|
69
68
|
"name": "direction",
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
{
|
|
79
78
|
"name": "[event]close",
|
|
80
79
|
"description": "关闭滑块时触发",
|
|
81
|
-
"type": "(index:number)=>void",
|
|
82
80
|
"params": [
|
|
83
81
|
{
|
|
84
82
|
"name": "index",
|
|
@@ -87,4 +85,4 @@
|
|
|
87
85
|
]
|
|
88
86
|
}
|
|
89
87
|
]
|
|
90
|
-
}
|
|
88
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `current` | 当前显示滑块的 index | `number` | `0` | - | - |
|
|
@@ -19,8 +21,10 @@
|
|
|
19
21
|
| `highlightActive` | 是否启用突出显示模式(当前项正常大小,非当前项缩小) | `boolean` | `false` | - | `1.22.20` |
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
### Events
|
|
23
25
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
24
26
|
| ----- | ----- | ------- | -------- |
|
|
25
27
|
| `change` | 监听item切换 | `index`:当前显示滑块的 index<br/>`source`:触发切换的来源 | - |
|
|
26
28
|
| `error` | 错误监听 | `error`:错误信息<br/>`context`:提示内容 | - |
|
|
29
|
+
|
|
30
|
+
|