stellar-ui-v2 1.40.4 → 1.40.5

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.
Files changed (31) hide show
  1. package/README.md +8 -8
  2. package/components/ste-animate/animate.scss +247 -247
  3. package/components/ste-coupon-list/ste-coupon-list.vue +1 -1
  4. package/components/ste-guide-qa/README.md +115 -115
  5. package/components/ste-index-list/README.md +6 -6
  6. package/components/ste-message-box/ste-message-box.js +72 -72
  7. package/components/ste-navbar/README.md +125 -125
  8. package/components/ste-progress/README.md +16 -16
  9. package/components/ste-progress/ste-progress.vue +206 -206
  10. package/components/ste-qrcode/README.md +17 -17
  11. package/components/ste-qrcode/uqrcode.js +33 -33
  12. package/components/ste-rate/README.md +13 -13
  13. package/components/ste-search/README.md +5 -5
  14. package/components/ste-select/datetime.vue +106 -106
  15. package/components/ste-signature/README.md +49 -30
  16. package/components/ste-signature/ste-signature.vue +313 -6
  17. package/components/ste-slider/README.md +4 -4
  18. package/components/ste-stepper/README.md +14 -14
  19. package/components/ste-stepper/ste-stepper.vue +494 -494
  20. package/components/ste-swiper/README.md +29 -29
  21. package/components/ste-table/ste-table.vue +634 -634
  22. package/components/ste-table-column/checkbox-icon.vue +65 -65
  23. package/components/ste-table-column/common.scss +65 -65
  24. package/components/ste-table-column/radio-icon.vue +110 -110
  25. package/components/ste-table-column/sub-table.vue +116 -116
  26. package/components/ste-table-column/var.scss +1 -1
  27. package/components/ste-tabs/README.md +63 -63
  28. package/components/ste-tabs/props.js +212 -212
  29. package/components/ste-toast/ste-toast.js +69 -69
  30. package/components/ste-video/ste-video.vue +632 -632
  31. package/package.json +1 -1
@@ -62,25 +62,25 @@
62
62
  ---$
63
63
  ### API
64
64
  #### Props
65
- | 参数 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
66
- | --- | --- | --- | --- | --- | --- |
67
- |`activeBg` | 进度条激活部分的背景 | `String` | `#0090FF` | - | - |
68
- |`inactiveBg` | 进度条未激活部分的背景 | `String` | `#eeeeee` | - | - |
69
- |`percentage` | 进度条百分比 | `Number` | `0` | 0-100 | - |
70
- |`strokeWidth` | 进度条的粗细,默认单位rpx | `String/Number` | `24rpx` | - | - |
71
- |`disabled` | 是否禁用 | `Boolean` | `false` | - | - |
72
- |`width` | 宽度 <br/>Number,单位rpx<br/>String,同原生<br/>默认宽度是`100%`,会根据父容器的宽度,如果父容器没有宽度将不会显示 | `String/Number` | `100%` | - | - |
73
- |`duration` | 动画时间,单位秒,设置为 0 可以禁用动画 | `Number` | `0.3` | - | - |
74
- |`pivotText` | 进度文字内容 | `String` | - | - | - |
75
- |`textColor` | 进度文字颜色 | `String` | `#ffffff` | - | - |
76
- |`textAlign` | 文本对齐方式 | `String` | `right` | `left` 居左<br/>`center` 居中 | - |
77
- |`textSize` | 文本字体大小,默认单位rpx | `String/Number` | `16` | - | - |
78
- |`displayTextThreshold` | 默认文本显示阈值 | `Number` | `0` | - | - |
65
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
66
+ | --- | --- | --- | --- | --- | --- |
67
+ |`activeBg` | 进度条激活部分的背景 | `String` | `#0090FF` | - | - |
68
+ |`inactiveBg` | 进度条未激活部分的背景 | `String` | `#eeeeee` | - | - |
69
+ |`percentage` | 进度条百分比 | `Number` | `0` | 0-100 | - |
70
+ |`strokeWidth` | 进度条的粗细,默认单位rpx | `String/Number` | `24rpx` | - | - |
71
+ |`disabled` | 是否禁用 | `Boolean` | `false` | - | - |
72
+ |`width` | 宽度 <br/>Number,单位rpx<br/>String,同原生<br/>默认宽度是`100%`,会根据父容器的宽度,如果父容器没有宽度将不会显示 | `String/Number` | `100%` | - | - |
73
+ |`duration` | 动画时间,单位秒,设置为 0 可以禁用动画 | `Number` | `0.3` | - | - |
74
+ |`pivotText` | 进度文字内容 | `String` | - | - | - |
75
+ |`textColor` | 进度文字颜色 | `String` | `#ffffff` | - | - |
76
+ |`textAlign` | 文本对齐方式 | `String` | `right` | `left` 居左<br/>`center` 居中 | - |
77
+ |`textSize` | 文本字体大小,默认单位rpx | `String/Number` | `16` | - | - |
78
+ |`displayTextThreshold` | 默认文本显示阈值 | `Number` | `0` | - | - |
79
79
  |`borderRadius` | 进度条圆角值(单位rpx) | `String/Number` | `24` | - | `v1.40.3` |
80
80
 
81
81
  #### Slots
82
- |插槽名 |说明 |插槽参数 |支持版本 |
83
- | --- | --- | --- | --- |
82
+ |插槽名 |说明 |插槽参数 |支持版本 |
83
+ | --- | --- | --- | --- |
84
84
  | `default` | 进度条内容 |- | - |
85
85
 
86
86
  ---$
@@ -1,206 +1,206 @@
1
- <template>
2
- <view class="ste-progress-root" :style="[cmpRootCssVar]">
3
- <view class="inactive-box" :style="[cmpInactiveStyle]"></view>
4
- <view class="active-box line" :style="[cmpActiveStyle]" v-if="realPercentage > 0">
5
- <slot v-if="haveSlot"></slot>
6
- <text class="text" v-else>{{ cmpActiveText }}</text>
7
- </view>
8
- </view>
9
- </template>
10
-
11
- <script>
12
- import utils from '../../utils/utils.js';
13
- import useColor from '../../config/color.js';
14
- let color = useColor();
15
- /**
16
- * ste-progress 进度条
17
- * @description 进度条组件
18
- * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-progress
19
- * @property {String} activeBg 进度条激活部分的背景 默认值 #0090FF
20
- * @property {String} inactiveBg 进度条未激活部分的背景 默认值 #eeeeee
21
- * @property {Number} percentage 进度条百分比 默认值 0
22
- * @property {Number|String} strokeWidth 进度条的粗细,默认单位rpx 默认值 24
23
- * @property {Boolean} disabled 是否禁用状态 默认 false
24
- * @property {Number|String} width 进度条宽度 默认值 100%
25
- * @property {Number} duration 进度条动画执行时间,单位秒,设置为 0 可以禁用动画 默认值 0.3
26
- * @property {String} pivotText 进度文字内容
27
- * @property {String} textColor 进度文字颜色 默认 #ffffff
28
- * @property {String} textAlign 文本对齐方式 默认 right
29
- * @property {String} textSize 文本字体大小,默认单位rpx 默认 16
30
- * @property {Number} displayTextThreshold 默认文本显示阈值 默认 0
31
- * @property {Number|String} borderRadius 进度条圆角值(单位rpx) 默认 24
32
- */
33
- const MIN = 0;
34
- const MAX = 100;
35
- export default {
36
- group: '数据组件',
37
- title: 'Progress 进度条',
38
- name: 'ste-progress',
39
- props: {
40
- activeBg: {
41
- type: [String, null],
42
- default: '',
43
- },
44
- inactiveBg: {
45
- type: [String, null],
46
- default: '#eeeeee',
47
- },
48
- percentage: {
49
- type: [Number, null],
50
- default: 0,
51
- },
52
- strokeWidth: {
53
- type: [String, Number, null],
54
- default: 24,
55
- },
56
- disabled: {
57
- type: [Boolean, null],
58
- default: false,
59
- },
60
- width: {
61
- type: [String, Number, null],
62
- default: '100%',
63
- },
64
- duration: {
65
- type: [Number, null],
66
- default: 0.3,
67
- },
68
- pivotText: {
69
- type: [String, null],
70
- default: '',
71
- },
72
- textColor: {
73
- type: [String, null],
74
- default: '#ffffff',
75
- },
76
- textAlign: {
77
- type: [String, null],
78
- default: 'right',
79
- },
80
- textSize: {
81
- type: [String, Number, null],
82
- default: 16,
83
- },
84
- displayTextThreshold: {
85
- type: [Number, null],
86
- default: 0,
87
- },
88
- borderRadius: {
89
- type: [String, Number, null],
90
- default: 24,
91
- },
92
- },
93
- data() {
94
- return {
95
- realPercentage: 0,
96
- haveSlot: false,
97
- };
98
- },
99
- created() {},
100
- mounted() {
101
- this.haveSlot = this.$slots.default;
102
- },
103
- computed: {
104
- cmpRootCssVar() {
105
- const style = {
106
- '--progress-width': utils.formatPx(this.width),
107
- '--progress-height': utils.formatPx(this.strokeWidth),
108
- '--progress-border-radius': utils.formatPx(this.borderRadius),
109
- // #ifdef MP-WEIXIN || MP-ALIPAY
110
- '--progress-padding': this.$slots.default ? '0' : '0 16rpx',
111
- // #endif
112
- // #ifdef H5
113
- '--progress-padding': this.$slots.default ? '0' : '0 8px',
114
- // #endif
115
- '--active-width': this.realPercentage + '%',
116
- '--active-text-align': this.textAlign == 'right' ? 'flex-end' : this.textAlign,
117
- '--active-text-color': this.textColor,
118
- '--active-text-font-size': utils.formatPx(this.textSize),
119
- '--active-transition-duration': `${this.duration}s`,
120
- };
121
- return style;
122
- },
123
- cmpInactiveStyle() {
124
- let style = {};
125
- if (this.disabled) {
126
- style.backgroundColor = '#eeeeee';
127
- } else {
128
- const bg = utils.bg2style(this.inactiveBg);
129
- style = { ...style, ...bg };
130
- }
131
- return style;
132
- },
133
- cmpActiveStyle() {
134
- let style = {};
135
- if (this.disabled) {
136
- style.backgroundColor = '#cccccc';
137
- } else {
138
- const bg = utils.bg2style(this.activeBg ? this.activeBg : color.getColor().steThemeColor);
139
- style = { ...style, ...bg };
140
- }
141
- return style;
142
- },
143
- cmpActiveText() {
144
- let str = this.pivotText ? this.pivotText : this.realPercentage <= MIN ? '' : `${this.realPercentage}%`;
145
- if (this.displayTextThreshold > 0 && this.realPercentage < this.displayTextThreshold) {
146
- return '';
147
- }
148
- return str;
149
- },
150
- },
151
- watch: {
152
- percentage: {
153
- handler(val) {
154
- if (this.percentage >= MAX) {
155
- this.realPercentage = MAX;
156
- } else if (this.percentage <= MIN) {
157
- this.realPercentage = MIN;
158
- } else {
159
- this.realPercentage = val;
160
- }
161
- },
162
- immediate: true,
163
- },
164
- },
165
- methods: {},
166
- };
167
- </script>
168
-
169
- <style lang="scss" scoped>
170
- .ste-progress-root {
171
- position: relative;
172
- width: var(--progress-width);
173
- height: var(--progress-height);
174
-
175
- .inactive-box,
176
- .active-box {
177
- width: var(--progress-width);
178
- height: var(--progress-height);
179
- border-radius: var(--progress-border-radius);
180
-
181
- background-repeat: repeat;
182
- background-size: contain;
183
- }
184
-
185
- .active-box {
186
- width: var(--active-width);
187
- position: absolute;
188
- left: 0;
189
- top: 0;
190
-
191
- display: flex;
192
- align-items: center;
193
- justify-content: var(--active-text-align);
194
- padding: var(--progress-padding);
195
-
196
- transition: width var(--active-transition-duration) ease;
197
-
198
- .text {
199
- color: var(--active-text-color);
200
- font-size: var(--active-text-font-size);
201
- vertical-align: middle;
202
- line-height: 0;
203
- }
204
- }
205
- }
206
- </style>
1
+ <template>
2
+ <view class="ste-progress-root" :style="[cmpRootCssVar]">
3
+ <view class="inactive-box" :style="[cmpInactiveStyle]"></view>
4
+ <view class="active-box line" :style="[cmpActiveStyle]" v-if="realPercentage > 0">
5
+ <slot v-if="haveSlot"></slot>
6
+ <text class="text" v-else>{{ cmpActiveText }}</text>
7
+ </view>
8
+ </view>
9
+ </template>
10
+
11
+ <script>
12
+ import utils from '../../utils/utils.js';
13
+ import useColor from '../../config/color.js';
14
+ let color = useColor();
15
+ /**
16
+ * ste-progress 进度条
17
+ * @description 进度条组件
18
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-progress
19
+ * @property {String} activeBg 进度条激活部分的背景 默认值 #0090FF
20
+ * @property {String} inactiveBg 进度条未激活部分的背景 默认值 #eeeeee
21
+ * @property {Number} percentage 进度条百分比 默认值 0
22
+ * @property {Number|String} strokeWidth 进度条的粗细,默认单位rpx 默认值 24
23
+ * @property {Boolean} disabled 是否禁用状态 默认 false
24
+ * @property {Number|String} width 进度条宽度 默认值 100%
25
+ * @property {Number} duration 进度条动画执行时间,单位秒,设置为 0 可以禁用动画 默认值 0.3
26
+ * @property {String} pivotText 进度文字内容
27
+ * @property {String} textColor 进度文字颜色 默认 #ffffff
28
+ * @property {String} textAlign 文本对齐方式 默认 right
29
+ * @property {String} textSize 文本字体大小,默认单位rpx 默认 16
30
+ * @property {Number} displayTextThreshold 默认文本显示阈值 默认 0
31
+ * @property {Number|String} borderRadius 进度条圆角值(单位rpx) 默认 24
32
+ */
33
+ const MIN = 0;
34
+ const MAX = 100;
35
+ export default {
36
+ group: '数据组件',
37
+ title: 'Progress 进度条',
38
+ name: 'ste-progress',
39
+ props: {
40
+ activeBg: {
41
+ type: [String, null],
42
+ default: '',
43
+ },
44
+ inactiveBg: {
45
+ type: [String, null],
46
+ default: '#eeeeee',
47
+ },
48
+ percentage: {
49
+ type: [Number, null],
50
+ default: 0,
51
+ },
52
+ strokeWidth: {
53
+ type: [String, Number, null],
54
+ default: 24,
55
+ },
56
+ disabled: {
57
+ type: [Boolean, null],
58
+ default: false,
59
+ },
60
+ width: {
61
+ type: [String, Number, null],
62
+ default: '100%',
63
+ },
64
+ duration: {
65
+ type: [Number, null],
66
+ default: 0.3,
67
+ },
68
+ pivotText: {
69
+ type: [String, null],
70
+ default: '',
71
+ },
72
+ textColor: {
73
+ type: [String, null],
74
+ default: '#ffffff',
75
+ },
76
+ textAlign: {
77
+ type: [String, null],
78
+ default: 'right',
79
+ },
80
+ textSize: {
81
+ type: [String, Number, null],
82
+ default: 16,
83
+ },
84
+ displayTextThreshold: {
85
+ type: [Number, null],
86
+ default: 0,
87
+ },
88
+ borderRadius: {
89
+ type: [String, Number, null],
90
+ default: 24,
91
+ },
92
+ },
93
+ data() {
94
+ return {
95
+ realPercentage: 0,
96
+ haveSlot: false,
97
+ };
98
+ },
99
+ created() {},
100
+ mounted() {
101
+ this.haveSlot = this.$slots.default;
102
+ },
103
+ computed: {
104
+ cmpRootCssVar() {
105
+ const style = {
106
+ '--progress-width': utils.formatPx(this.width),
107
+ '--progress-height': utils.formatPx(this.strokeWidth),
108
+ '--progress-border-radius': utils.formatPx(this.borderRadius),
109
+ // #ifdef MP-WEIXIN || MP-ALIPAY
110
+ '--progress-padding': this.$slots.default ? '0' : '0 16rpx',
111
+ // #endif
112
+ // #ifdef H5
113
+ '--progress-padding': this.$slots.default ? '0' : '0 8px',
114
+ // #endif
115
+ '--active-width': this.realPercentage + '%',
116
+ '--active-text-align': this.textAlign == 'right' ? 'flex-end' : this.textAlign,
117
+ '--active-text-color': this.textColor,
118
+ '--active-text-font-size': utils.formatPx(this.textSize),
119
+ '--active-transition-duration': `${this.duration}s`,
120
+ };
121
+ return style;
122
+ },
123
+ cmpInactiveStyle() {
124
+ let style = {};
125
+ if (this.disabled) {
126
+ style.backgroundColor = '#eeeeee';
127
+ } else {
128
+ const bg = utils.bg2style(this.inactiveBg);
129
+ style = { ...style, ...bg };
130
+ }
131
+ return style;
132
+ },
133
+ cmpActiveStyle() {
134
+ let style = {};
135
+ if (this.disabled) {
136
+ style.backgroundColor = '#cccccc';
137
+ } else {
138
+ const bg = utils.bg2style(this.activeBg ? this.activeBg : color.getColor().steThemeColor);
139
+ style = { ...style, ...bg };
140
+ }
141
+ return style;
142
+ },
143
+ cmpActiveText() {
144
+ let str = this.pivotText ? this.pivotText : this.realPercentage <= MIN ? '' : `${this.realPercentage}%`;
145
+ if (this.displayTextThreshold > 0 && this.realPercentage < this.displayTextThreshold) {
146
+ return '';
147
+ }
148
+ return str;
149
+ },
150
+ },
151
+ watch: {
152
+ percentage: {
153
+ handler(val) {
154
+ if (this.percentage >= MAX) {
155
+ this.realPercentage = MAX;
156
+ } else if (this.percentage <= MIN) {
157
+ this.realPercentage = MIN;
158
+ } else {
159
+ this.realPercentage = val;
160
+ }
161
+ },
162
+ immediate: true,
163
+ },
164
+ },
165
+ methods: {},
166
+ };
167
+ </script>
168
+
169
+ <style lang="scss" scoped>
170
+ .ste-progress-root {
171
+ position: relative;
172
+ width: var(--progress-width);
173
+ height: var(--progress-height);
174
+
175
+ .inactive-box,
176
+ .active-box {
177
+ width: var(--progress-width);
178
+ height: var(--progress-height);
179
+ border-radius: var(--progress-border-radius);
180
+
181
+ background-repeat: repeat;
182
+ background-size: contain;
183
+ }
184
+
185
+ .active-box {
186
+ width: var(--active-width);
187
+ position: absolute;
188
+ left: 0;
189
+ top: 0;
190
+
191
+ display: flex;
192
+ align-items: center;
193
+ justify-content: var(--active-text-align);
194
+ padding: var(--progress-padding);
195
+
196
+ transition: width var(--active-transition-duration) ease;
197
+
198
+ .text {
199
+ color: var(--active-text-color);
200
+ font-size: var(--active-text-font-size);
201
+ vertical-align: middle;
202
+ line-height: 0;
203
+ }
204
+ }
205
+ }
206
+ </style>
@@ -11,18 +11,18 @@
11
11
 
12
12
  #### 自定义颜色
13
13
  ```html
14
- <ste-qrcode
15
- content="https://stellar-ui.intecloud.com.cn/mp/index/index"
16
- foreground="#c11"
17
- background="#dad"
14
+ <ste-qrcode
15
+ content="https://stellar-ui.intecloud.com.cn/mp/index/index"
16
+ foreground="#c11"
17
+ background="#dad"
18
18
  />
19
19
  ```
20
20
 
21
21
  #### 带logo
22
22
  ```html
23
- <ste-qrcode
24
- content="https://stellar-ui.intecloud.com.cn/mp/index/index"
25
- foregroundImageSrc="https://image.whzb.com/chain/StellarUI/logo.png"
23
+ <ste-qrcode
24
+ content="https://stellar-ui.intecloud.com.cn/mp/index/index"
25
+ foregroundImageSrc="https://image.whzb.com/chain/StellarUI/logo.png"
26
26
  />
27
27
 
28
28
  ```
@@ -31,19 +31,19 @@
31
31
  ---$
32
32
  ### API
33
33
  #### Props
34
- | 参数 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
35
- | --- | --- | --- | --- | --- | --- |
36
- | `content` | 二维码内容 | `String` | - | - | `v1.35.4` |
37
- | `size` | 二维码尺寸,单位`px` | `Number` | 200 | - | `v1.35.4` |
38
- | `background` | 背景色 | `String` | `#fff` | - | `v1.35.4` |
39
- | `foreground` | 前景色(二维码画笔颜色) | `String` | `#000` | - | `v1.35.4` |
40
- | `foregroundImageSrc` | 二维码中间logo图 | `String` | - | - | `v1.35.4` |
41
- | `foregroundImageWidth` | logo图宽度, 默认二维码尺寸的四分之一 | `Number` | `size/4` | - | `v1.35.4` |
34
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
35
+ | --- | --- | --- | --- | --- | --- |
36
+ | `content` | 二维码内容 | `String` | - | - | `v1.35.4` |
37
+ | `size` | 二维码尺寸,单位`px` | `Number` | 200 | - | `v1.35.4` |
38
+ | `background` | 背景色 | `String` | `#fff` | - | `v1.35.4` |
39
+ | `foreground` | 前景色(二维码画笔颜色) | `String` | `#000` | - | `v1.35.4` |
40
+ | `foregroundImageSrc` | 二维码中间logo图 | `String` | - | - | `v1.35.4` |
41
+ | `foregroundImageWidth` | logo图宽度, 默认二维码尺寸的四分之一 | `Number` | `size/4` | - | `v1.35.4` |
42
42
  | `foregroundImageHeight` | logo图高度, 默认二维码尺寸的四分之一 | `Number` | `size/4` | - | `v1.35.4` |
43
43
 
44
44
  #### Events
45
- |事件名 |说明 |事件参数 |支持版本 |
46
- | --- | --- | --- | --- |
45
+ |事件名 |说明 |事件参数 |支持版本 |
46
+ | --- | --- | --- | --- |
47
47
  | `loadImage` | `二维码获取图片数据` | `src` | `v1.35.4` |
48
48
 
49
49
  ---$