stellar-ui-plus 1.25.1 → 1.25.3
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 +21 -4
- package/components/ste-area-chart/ste-area-chart.vue +33 -1
- 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 +20 -5
- package/components/ste-bar-chart/ste-bar-chart.vue +34 -1
- 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 +22 -7
- package/components/ste-column-chart/ste-column-chart.vue +34 -1
- 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 +21 -6
- package/components/ste-funnel-chart/ste-funnel-chart.vue +34 -1
- 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 +22 -7
- package/components/ste-line-chart/ste-line-chart.vue +34 -1
- 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 +21 -6
- package/components/ste-pie-chart/ste-pie-chart.vue +34 -1
- 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 +33 -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 +11 -21
- package/components/ste-slider/ste-slider.easycom.json +12 -4
- 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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
9
|
JavaScript后面的演示代码中涉及到的变量和方法都使用本`javascript`代码
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ let value4 = ref(2.5);
|
|
|
18
18
|
let value5 = ref(2);
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
## 基础用法
|
|
22
22
|
|
|
23
23
|
通过`value`属性,双向绑定,设置评分的值
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ let value5 = ref(2);
|
|
|
28
28
|
</template>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
## 自定义图标
|
|
32
32
|
|
|
33
33
|
- 通过`inactiveCode`属性,设置未选中的图标code,默认``。
|
|
34
34
|
- 通过`activeCode`属性,设置选中的图标code,默认``。
|
|
@@ -43,7 +43,7 @@ let value5 = ref(2);
|
|
|
43
43
|
</template>
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
## 自定义样式
|
|
47
47
|
|
|
48
48
|
- 通过`inactiveColor`属性,设置未选中的颜色,默认`#dddddd`。
|
|
49
49
|
- 通过`activeColor`属性,设置选中的颜色,默认`#0090FF`。
|
|
@@ -56,7 +56,7 @@ let value5 = ref(2);
|
|
|
56
56
|
</template>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
## 只读
|
|
60
60
|
|
|
61
61
|
通过`readonly `属性,设置只读,不可切换评分,样式不置灰,可部分星, 默认`false`。
|
|
62
62
|
|
|
@@ -66,7 +66,7 @@ let value5 = ref(2);
|
|
|
66
66
|
</template>
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
## 禁用
|
|
70
70
|
|
|
71
71
|
通过`disabled`属性,设置禁用,不可切换评分,样式置灰,可部分星,默认`false`。
|
|
72
72
|
|
|
@@ -76,7 +76,7 @@ let value5 = ref(2);
|
|
|
76
76
|
</template>
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
## 自定义数量和自定义分值
|
|
80
80
|
|
|
81
81
|
- 通过`count`属性,设置图标总数,默认`5`。
|
|
82
82
|
- 通过`score`属性,设置每颗图标代表的分数,默认`1`。
|
|
@@ -88,7 +88,7 @@ let value5 = ref(2);
|
|
|
88
88
|
</template>
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
## 自定义分值图标
|
|
92
92
|
|
|
93
93
|
- 需要传入图标code对应的数组, 此时`inactiveColor`和`activeColor`将失效
|
|
94
94
|
- 会根据当前评分数对应的图标数量来取`iconData`中的值为当前图标的`code`
|
|
@@ -105,8 +105,6 @@ let value5 = ref(2);
|
|
|
105
105
|
|
|
106
106
|
---$
|
|
107
107
|
|
|
108
|
-
### API
|
|
109
|
-
|
|
110
108
|
<!-- props -->
|
|
111
109
|
|
|
112
110
|
---$
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `showHeight` | 需要折叠的高度 | `string / number` | `400` | - | - |
|
|
@@ -9,8 +11,22 @@
|
|
|
9
11
|
| `color` | 文本颜色 | `string` | `#666666` | - | - |
|
|
10
12
|
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
### Events
|
|
13
15
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
14
16
|
| ----- | ----- | ------- | -------- |
|
|
15
|
-
| `open` | 展开时触发 |
|
|
16
|
-
| `click` | 收起时触发 |
|
|
17
|
+
| `open` | 展开时触发 | `data`:() => void | - |
|
|
18
|
+
| `click` | 收起时触发 | `data`:() => void | - |
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Methods
|
|
22
|
+
| 方法名 | 说明 | 参数 | 返回值 | 支持版本 |
|
|
23
|
+
| ----- | ----- | --- | ------ | -------- |
|
|
24
|
+
| `init` | 重新初始化组件内部高度计算过程,如果是异步获取内容需要用到 | - | - | - |
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Slots
|
|
28
|
+
| 插槽名 | 说明 | 参数 | 支持版本 |
|
|
29
|
+
| ----- | ----- | --- | -------- |
|
|
30
|
+
| `default` | 单选框文本内容 | - | - |
|
|
31
|
+
|
|
32
|
+
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 基础使用
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
12
|
<template>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</script>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## 收起后展示按钮
|
|
25
25
|
|
|
26
26
|
```html
|
|
27
27
|
<template>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
## 提示文字
|
|
40
40
|
|
|
41
41
|
```html
|
|
42
42
|
<template>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</script>
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
## 异步初始化
|
|
55
55
|
|
|
56
56
|
有时候需要展示的内容是从后端获取的,组件内部的`mounted`生命周期初始化时,请求尚未回来,会导致 内容的高度在初始化有误差。可以在请求完毕渲染后(指的是this.$nextTick),通过`ref`调用组件的`init`方法,重新初始化
|
|
57
57
|
|
|
@@ -83,21 +83,7 @@
|
|
|
83
83
|
|
|
84
84
|
---$
|
|
85
85
|
|
|
86
|
-
### API
|
|
87
|
-
|
|
88
86
|
<!-- props -->
|
|
89
87
|
|
|
90
|
-
#### Slots
|
|
91
|
-
|
|
92
|
-
| 插槽名 | 说明 | 插槽参数 | 支持版本 |
|
|
93
|
-
| --------- | -------------- | -------- | -------- |
|
|
94
|
-
| `default` | 单选框文本内容 | - | - |
|
|
95
|
-
|
|
96
|
-
#### Methods
|
|
97
|
-
|
|
98
|
-
| 方法名 | 说明 | 方法参数 | 支持版本 |
|
|
99
|
-
| ------ | ---------------------------------------------------------- | -------- | -------- |
|
|
100
|
-
| `init` | 重新初始化组件内部高度计算过程,如果是异步获取内容需要用到 | - | - |
|
|
101
|
-
|
|
102
88
|
---$
|
|
103
89
|
{{fuyuwei}}
|
|
@@ -43,12 +43,30 @@
|
|
|
43
43
|
{
|
|
44
44
|
"name": "[event]open",
|
|
45
45
|
"description": "展开时触发",
|
|
46
|
-
"
|
|
46
|
+
"params": [
|
|
47
|
+
{
|
|
48
|
+
"name": "data",
|
|
49
|
+
"description": "() => void"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
47
52
|
},
|
|
48
53
|
{
|
|
49
54
|
"name": "[event]click",
|
|
50
55
|
"description": "收起时触发",
|
|
51
|
-
"
|
|
56
|
+
"params": [
|
|
57
|
+
{
|
|
58
|
+
"name": "data",
|
|
59
|
+
"description": "() => void"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "[method]init",
|
|
65
|
+
"description": "重新初始化组件内部高度计算过程,如果是异步获取内容需要用到"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "[slot]default",
|
|
69
|
+
"description": "单选框文本内容"
|
|
52
70
|
}
|
|
53
71
|
]
|
|
54
72
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 一张图片
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
10
|
<template>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## 两张图片
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
18
|
<template>
|
|
@@ -22,8 +22,6 @@
|
|
|
22
22
|
|
|
23
23
|
---$
|
|
24
24
|
|
|
25
|
-
### API
|
|
26
|
-
|
|
27
25
|
<!-- props -->
|
|
28
26
|
|
|
29
27
|
---$
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 默认配置
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
12
|
<template>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</script>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
## 默认颜色
|
|
30
30
|
|
|
31
31
|
- 属性`color`: `['#165DFF', '#14C9C9', '#F7BA1E', '#3491FA', '#722ED1', '#9FDB1D']`
|
|
32
32
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</script>
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
## 副标题,标题+副标题
|
|
56
56
|
|
|
57
57
|
- 属性`subtitle`: 副标题对象
|
|
58
58
|
- 属性`title`: 标题对象
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
</script>
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
## 图例
|
|
80
80
|
|
|
81
81
|
- 属性`legend`: 图例对象
|
|
82
82
|
|
|
@@ -104,6 +104,23 @@
|
|
|
104
104
|
</script>
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
+
## 事件
|
|
108
|
+
|
|
109
|
+
- 属性`getImage`: 通过ref来获取实例的base64格式的图片地址,异步方法,需在实例生成后调用。
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<template>
|
|
113
|
+
<ste-ring-chart :series="series1" ref="ringChart"></ste-ring-chart>
|
|
114
|
+
</template>
|
|
115
|
+
<script setup lang="ts">
|
|
116
|
+
import { ref,onMounted } from 'vue';
|
|
117
|
+
let ringChart: any = ref(null);
|
|
118
|
+
onMounted(async () => {
|
|
119
|
+
const base64 = await ringChart.value.getImage()
|
|
120
|
+
}),
|
|
121
|
+
</script>
|
|
122
|
+
```
|
|
123
|
+
|
|
107
124
|
---$
|
|
108
125
|
|
|
109
126
|
<!-- props -->
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<script setup lang="ts">
|
|
8
8
|
import uCharts from '../../Charts/Charts';
|
|
9
|
-
import { ref, onMounted, computed, type CSSProperties, watch, getCurrentInstance } from 'vue';
|
|
9
|
+
import { ref, onMounted, computed, type CSSProperties, watch, getCurrentInstance, type ComponentPublicInstance } from 'vue';
|
|
10
10
|
import utils from '../../utils/utils';
|
|
11
11
|
import { propsData, propsComponent } from './props';
|
|
12
12
|
import type { ChartsOptions } from '../../Charts/types/index';
|
|
@@ -95,6 +95,38 @@ function tap(e: any) {
|
|
|
95
95
|
charts?.value.touchLegend(e);
|
|
96
96
|
charts?.value.showToolTip(e);
|
|
97
97
|
}
|
|
98
|
+
const thas = ref<ComponentPublicInstance | null>();
|
|
99
|
+
async function getImage() {
|
|
100
|
+
if (props.canvas2d == false) {
|
|
101
|
+
return new Promise(resolve => {
|
|
102
|
+
uni.canvasToTempFilePath(
|
|
103
|
+
{
|
|
104
|
+
canvasId: canvasId.value,
|
|
105
|
+
success: res => {
|
|
106
|
+
resolve(res.tempFilePath);
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
thas.value
|
|
110
|
+
);
|
|
111
|
+
});
|
|
112
|
+
} else {
|
|
113
|
+
return new Promise(resolve => {
|
|
114
|
+
const query = uni.createSelectorQuery().in(thas.value);
|
|
115
|
+
query
|
|
116
|
+
.select('#' + canvasId.value)
|
|
117
|
+
.fields({ node: true, size: true })
|
|
118
|
+
.exec(res => {
|
|
119
|
+
if (res[0]) {
|
|
120
|
+
const canvas = res[0].node;
|
|
121
|
+
resolve(canvas.toDataURL('image/png'));
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
defineExpose({
|
|
128
|
+
getImage,
|
|
129
|
+
});
|
|
98
130
|
</script>
|
|
99
131
|
|
|
100
132
|
<style scoped></style>
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `active` | 当前激活的节点 | `number` | `0` | - | - |
|
|
5
7
|
| `height` | 滚动区域高度 | `number / string` | `100%` | - | - |
|
|
6
8
|
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
### Events
|
|
9
11
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
10
12
|
| ----- | ----- | ------- | -------- |
|
|
11
|
-
| `change` | 激活节点改变时触发 |
|
|
13
|
+
| `change` | 激活节点改变时触发 | `data`:(index:number)=>void | - |
|
|
14
|
+
|
|
15
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 基础用法
|
|
8
8
|
|
|
9
9
|
```html
|
|
10
10
|
<script setup lang="ts">
|
|
@@ -35,11 +35,9 @@
|
|
|
35
35
|
|
|
36
36
|
---$
|
|
37
37
|
|
|
38
|
-
### API
|
|
39
|
-
|
|
40
38
|
<!-- props -->
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
## ScrollTo Method
|
|
43
41
|
|
|
44
42
|
| 方法名 | 说明 | 支持版本 |
|
|
45
43
|
| ------ | ---------------------------------- | -------- |
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `type` | 组件类型 | `string` | `default` | `default`:正常搜索<br/>`nav`:导航栏 | - |
|
|
@@ -28,13 +30,22 @@
|
|
|
28
30
|
| `suggestionsList` | 搜索建议对应的数据 | `array` | `[]` | - | - |
|
|
29
31
|
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
### Events
|
|
32
34
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
33
35
|
| ----- | ----- | ------- | -------- |
|
|
34
36
|
| `input` | 输入事件 | `value`:输入框的值 | - |
|
|
35
37
|
| `focus` | 聚焦焦点事件 | `value`:输入框的值 | - |
|
|
36
38
|
| `blur` | 失去焦点事件 | `value`:输入框的值 | - |
|
|
37
39
|
| `search` | 确定搜索时触发 | `value`:输入框的值 | - |
|
|
38
|
-
| `clear` | 点击清除按钮后触发 |
|
|
40
|
+
| `clear` | 点击清除按钮后触发 | `data`:() => void | - |
|
|
39
41
|
| `click` | 点击事件 | `value`:输入框的值 | - |
|
|
40
42
|
| `selectSuggestion` | 点击搜索建议触发 | `item`:热词列表对象 | - |
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Slots
|
|
46
|
+
| 插槽名 | 说明 | 参数 | 支持版本 |
|
|
47
|
+
| ----- | ----- | --- | -------- |
|
|
48
|
+
| `prefix` | 输入框前插槽 | - | - |
|
|
49
|
+
| `suffix` | 输入框后插槽 | - | - |
|
|
50
|
+
|
|
51
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
9
|
**JavaScript**
|
|
10
10
|
|
|
@@ -37,7 +37,7 @@ const onClick = (v: string) => {
|
|
|
37
37
|
</script>
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
## 基础用法
|
|
41
41
|
|
|
42
42
|
- 通过`input`事件可以捕获用户输入行为,参数为输入的value内容
|
|
43
43
|
- 通过`search`事件可以捕获用户点击`搜索按钮`或`软键盘上的回车`行为,参数为输入的value内容
|
|
@@ -71,7 +71,7 @@ const onClick = (v: string) => {
|
|
|
71
71
|
</template>
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
## 搜索建议
|
|
75
75
|
|
|
76
76
|
- 给`suggestionsList`属性赋值时,会在输入框下方显示,数据结构见下方示例
|
|
77
77
|
- 点击某条建议后会触发搜索的`selectSuggestion`事件,参数为搜索建议对象
|
|
@@ -114,7 +114,7 @@ const onClick = (v: string) => {
|
|
|
114
114
|
</script>
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
## 热词列表
|
|
118
118
|
|
|
119
119
|
- 可以通过`hotWords`属性传入热词列表
|
|
120
120
|
- 可以通过`interval`属性设置热词切换间隔,单位为毫秒
|
|
@@ -144,7 +144,7 @@ const onClick = (v: string) => {
|
|
|
144
144
|
</template>
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
## 自定义按钮文本内容
|
|
148
148
|
|
|
149
149
|
- 可以通过`btnText`属性自定义按钮文本内容
|
|
150
150
|
|
|
@@ -162,7 +162,7 @@ const onClick = (v: string) => {
|
|
|
162
162
|
</template>
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
## 隐藏分割线以及按钮
|
|
166
166
|
|
|
167
167
|
- 可以通过`hiddenLine`属性隐藏分割线
|
|
168
168
|
- 可以通过`hiddenBtn`属性隐藏按钮,隐藏按钮时也会隐藏分割线
|
|
@@ -182,7 +182,7 @@ const onClick = (v: string) => {
|
|
|
182
182
|
</template>
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
## 隐藏输入框以及按钮
|
|
186
186
|
|
|
187
187
|
- 可以通过设置`hiddenInput`属性隐藏输入框 和 `hiddenBtn`属性隐藏按钮只保留放大镜的功能
|
|
188
188
|
|
|
@@ -202,7 +202,7 @@ const onClick = (v: string) => {
|
|
|
202
202
|
</template>
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
## 不显示清除图标
|
|
206
206
|
|
|
207
207
|
- 可以通过`clearable`属性来切换清除图标是否显示
|
|
208
208
|
|
|
@@ -220,7 +220,7 @@ const onClick = (v: string) => {
|
|
|
220
220
|
</template>
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
-
|
|
223
|
+
## 颜色和背景
|
|
224
224
|
|
|
225
225
|
- 可以通过`borderColor`属性设置边框颜色
|
|
226
226
|
- 可以通过`background`属性设置背景颜色或者背景图片
|
|
@@ -284,7 +284,7 @@ const onClick = (v: string) => {
|
|
|
284
284
|
</template>
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
## 自定义高度以及圆角弧度
|
|
288
288
|
|
|
289
289
|
- 可以通过`height`属性设置搜索框高度,默认值`64`
|
|
290
290
|
- 可以通过`radius`属性设置圆角弧度,默认值`32`
|
|
@@ -303,7 +303,7 @@ const onClick = (v: string) => {
|
|
|
303
303
|
</template>
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
## 导航模式
|
|
307
307
|
|
|
308
308
|
- 可以通过`type`属性设置`nav`开启导航模式;开启后,点击搜索框任意区域都会触发`click`事件,其他功能失效。
|
|
309
309
|
|
|
@@ -324,7 +324,7 @@ const onClick = (v: string) => {
|
|
|
324
324
|
</template>
|
|
325
325
|
```
|
|
326
326
|
|
|
327
|
-
|
|
327
|
+
## 聚焦
|
|
328
328
|
|
|
329
329
|
- 可以通过`fous`属性控制搜索框聚焦,双向绑定
|
|
330
330
|
|
|
@@ -351,16 +351,7 @@ const onClick = (v: string) => {
|
|
|
351
351
|
|
|
352
352
|
---$
|
|
353
353
|
|
|
354
|
-
### API
|
|
355
|
-
|
|
356
354
|
<!-- props -->
|
|
357
355
|
|
|
358
|
-
#### 组件插槽(Slots)
|
|
359
|
-
|
|
360
|
-
| 插槽名 | 说明 | 插槽参数 | 支持版本 |
|
|
361
|
-
| -------- | ------------ | -------- | -------- |
|
|
362
|
-
| `prefix` | 输入框前插槽 | - | - |
|
|
363
|
-
| `suffix` | 输入框后插槽 | - | - |
|
|
364
|
-
|
|
365
356
|
---$
|
|
366
357
|
{{xuyajun}}
|
|
@@ -167,7 +167,6 @@
|
|
|
167
167
|
{
|
|
168
168
|
"name": "[event]input",
|
|
169
169
|
"description": "输入事件",
|
|
170
|
-
"type": "(value: string) => void",
|
|
171
170
|
"params": [
|
|
172
171
|
{
|
|
173
172
|
"name": "value",
|
|
@@ -178,7 +177,6 @@
|
|
|
178
177
|
{
|
|
179
178
|
"name": "[event]focus",
|
|
180
179
|
"description": "聚焦焦点事件",
|
|
181
|
-
"type": "(value: string) => void",
|
|
182
180
|
"params": [
|
|
183
181
|
{
|
|
184
182
|
"name": "value",
|
|
@@ -189,7 +187,6 @@
|
|
|
189
187
|
{
|
|
190
188
|
"name": "[event]blur",
|
|
191
189
|
"description": "失去焦点事件",
|
|
192
|
-
"type": "(value: string) => void",
|
|
193
190
|
"params": [
|
|
194
191
|
{
|
|
195
192
|
"name": "value",
|
|
@@ -200,7 +197,6 @@
|
|
|
200
197
|
{
|
|
201
198
|
"name": "[event]search",
|
|
202
199
|
"description": "确定搜索时触发",
|
|
203
|
-
"type": "(value: string) => void",
|
|
204
200
|
"params": [
|
|
205
201
|
{
|
|
206
202
|
"name": "value",
|
|
@@ -211,12 +207,16 @@
|
|
|
211
207
|
{
|
|
212
208
|
"name": "[event]clear",
|
|
213
209
|
"description": "点击清除按钮后触发",
|
|
214
|
-
"
|
|
210
|
+
"params": [
|
|
211
|
+
{
|
|
212
|
+
"name": "data",
|
|
213
|
+
"description": "() => void"
|
|
214
|
+
}
|
|
215
|
+
]
|
|
215
216
|
},
|
|
216
217
|
{
|
|
217
218
|
"name": "[event]click",
|
|
218
219
|
"description": "点击事件",
|
|
219
|
-
"type": "(value: string) => void",
|
|
220
220
|
"params": [
|
|
221
221
|
{
|
|
222
222
|
"name": "value",
|
|
@@ -227,13 +227,20 @@
|
|
|
227
227
|
{
|
|
228
228
|
"name": "[event]selectSuggestion",
|
|
229
229
|
"description": "点击搜索建议触发",
|
|
230
|
-
"type": "(item: object) => void",
|
|
231
230
|
"params": [
|
|
232
231
|
{
|
|
233
232
|
"name": "item",
|
|
234
233
|
"description": "热词列表对象"
|
|
235
234
|
}
|
|
236
235
|
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "[slot]prefix",
|
|
239
|
+
"description": "输入框前插槽"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"name": "[slot]suffix",
|
|
243
|
+
"description": "输入框后插槽"
|
|
237
244
|
}
|
|
238
245
|
]
|
|
239
246
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
## API
|
|
2
|
+
|
|
3
|
+
### Props
|
|
2
4
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
5
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
6
|
| `value` | 当前值(支持v-model双向绑定) | `string / number` | `` | - | - |
|
|
@@ -12,7 +14,9 @@
|
|
|
12
14
|
| `confirmType` | 确认按钮类型 | `string` | `done` | - | - |
|
|
13
15
|
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
### Events
|
|
16
18
|
| 事件名 | 说明 | 事件参数 | 支持版本 |
|
|
17
19
|
| ----- | ----- | ------- | -------- |
|
|
18
20
|
| `search` | 确定搜索时触发 | `value`:输入框的值 | - |
|
|
21
|
+
|
|
22
|
+
|