stellar-ui-v2 1.39.0 → 1.40.0

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 (67) hide show
  1. package/components/ste-animate/ste-animate.vue +206 -200
  2. package/components/ste-badge/ste-badge.vue +9 -9
  3. package/components/ste-barcode/ste-barcode.vue +1 -1
  4. package/components/ste-button/ste-button.vue +1 -1
  5. package/components/ste-calendar/ste-calendar.vue +1 -1
  6. package/components/ste-checkbox/ste-checkbox.vue +1 -1
  7. package/components/ste-checkbox-group/ste-checkbox-group.vue +1 -1
  8. package/components/ste-code-input/ste-code-input.vue +287 -302
  9. package/components/ste-comment/ste-comment.vue +150 -136
  10. package/components/ste-date-picker/ste-date-picker.vue +1 -1
  11. package/components/ste-drag/ste-drag.vue +205 -203
  12. package/components/ste-dropdown-menu/ste-dropdown-menu.vue +411 -405
  13. package/components/ste-dropdown-menu-item/ste-dropdown-menu-item.vue +176 -176
  14. package/components/ste-guide-qa/ste-guide-qa.vue +1 -1
  15. package/components/ste-icon/ste-icon.vue +1 -1
  16. package/components/ste-image/ste-image.vue +218 -218
  17. package/components/ste-index-item/ste-index-item.vue +3 -3
  18. package/components/ste-index-list/ste-index-list.vue +1 -1
  19. package/components/ste-input/ste-input.vue +15 -7
  20. package/components/ste-loading/ste-loading.vue +1 -1
  21. package/components/ste-media-preview/ste-media-preview.vue +1 -1
  22. package/components/ste-message-box/ste-message-box.vue +1 -1
  23. package/components/ste-navbar/ste-navbar.vue +1 -1
  24. package/components/ste-notice-bar/ste-notice-bar.vue +266 -262
  25. package/components/ste-number-keyboard/ste-number-keyboard.vue +1 -1
  26. package/components/ste-picker/ste-picker.vue +217 -218
  27. package/components/ste-popup/ste-popup.vue +296 -301
  28. package/components/ste-price/ste-price.vue +258 -258
  29. package/components/ste-progress/ste-progress.vue +4 -4
  30. package/components/ste-qrcode/ste-qrcode.vue +1 -1
  31. package/components/ste-radio/ste-radio.vue +1 -1
  32. package/components/ste-radio-group/ste-radio-group.vue +1 -1
  33. package/components/ste-rate/ste-rate.vue +1 -1
  34. package/components/ste-read-more/ste-read-more.vue +138 -133
  35. package/components/ste-rich-text/ste-rich-text.vue +1 -1
  36. package/components/ste-scroll-to/ste-scroll-to.vue +1 -1
  37. package/components/ste-scroll-to-item/ste-scroll-to-item.vue +1 -1
  38. package/components/ste-search/ste-search.vue +1 -1
  39. package/components/ste-select/ste-select.vue +1 -1
  40. package/components/ste-signature/ste-signature.vue +203 -220
  41. package/components/ste-slider/ste-slider.vue +9 -12
  42. package/components/ste-step/ste-step.vue +241 -218
  43. package/components/ste-stepper/ste-stepper.vue +106 -2
  44. package/components/ste-steps/ste-steps.vue +1 -1
  45. package/components/ste-sticky/ste-sticky.vue +1 -1
  46. package/components/ste-swipe-action/ste-swipe-action.vue +1 -1
  47. package/components/ste-swipe-action-group/ste-swipe-action-group.vue +104 -104
  48. package/components/ste-swiper/ste-swiper.vue +1 -1
  49. package/components/ste-swiper-item/ste-swiper-item.vue +55 -44
  50. package/components/ste-switch/ste-switch.vue +1 -1
  51. package/components/ste-tab/ste-tab.vue +1 -1
  52. package/components/ste-table/ste-table.vue +634 -666
  53. package/components/ste-table-column/ste-table-column.vue +2 -4
  54. package/components/ste-tabs/ste-tabs.vue +1 -1
  55. package/components/ste-text/ste-text.vue +72 -72
  56. package/components/ste-toast/ste-toast.vue +231 -231
  57. package/components/ste-touch-swipe/ste-touch-swipe.vue +327 -327
  58. package/components/ste-touch-swipe-item/ste-touch-swipe-item.vue +33 -33
  59. package/components/ste-tour/ste-tour.vue +1 -1
  60. package/components/ste-tree/ste-tree.vue +1 -1
  61. package/components/ste-upload/README.md +8 -0
  62. package/components/ste-upload/ReadFile.js +261 -229
  63. package/components/ste-upload/ste-upload.vue +1 -1
  64. package/components/ste-video/ste-video.vue +40 -57
  65. package/package.json +1 -1
  66. package/utils/System.js +5 -0
  67. package/utils/utils.js +1 -19
@@ -1,200 +1,206 @@
1
- <template>
2
- <view class="ste-animate-root ste-animate" :class="[cmpRootClass]" :style="[cmpRootStyle]" @click="handleClick">
3
- <slot></slot>
4
- </view>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- group: '展示组件',
10
- title: 'Animate 动画',
11
- name: 'ste-animate',
12
- options: {
13
- virtualHost: true,
14
- },
15
- props: {
16
- show: {
17
- type: [Boolean, null],
18
- default: false,
19
- },
20
- type: {
21
- type: [String, null],
22
- default: '',
23
- },
24
- loop: {
25
- type: [Boolean, null],
26
- default: false,
27
- },
28
- duration: {
29
- type: [Number, null],
30
- default: 300,
31
- },
32
- action: {
33
- type: [String, null],
34
- default: '',
35
- },
36
- },
37
- data() {
38
- return {
39
- animationFlag: false, // 通过此标识控制动画执行
40
- };
41
- },
42
- computed: {
43
- cmpRootClass() {
44
- let classArr = [];
45
- if (this.type && (this.action === 'initial' || this.animationFlag || this.loop)) {
46
- classArr.push(`ste-animate-${this.type}`);
47
- }
48
- if (this.loop) {
49
- classArr.push('loop');
50
- }
51
- return classArr.join(' ');
52
- },
53
- cmpRootStyle() {
54
- let style = {};
55
- if (this.duration) {
56
- style.animationDuration = this.duration;
57
- }
58
- return style;
59
- },
60
- },
61
- watch: {
62
- show: {
63
- handler(val) {
64
- if (val) {
65
- this.animated();
66
- }
67
- },
68
- },
69
- },
70
- methods: {
71
- handleClick() {
72
- if (this.action === 'click') {
73
- this.animated();
74
- }
75
- },
76
- animated() {
77
- this.animationFlag = false;
78
- setTimeout(() => {
79
- this.animationFlag = true;
80
- }, 10);
81
- },
82
- },
83
- };
84
- </script>
85
-
86
- <style lang="scss" scoped>
87
- @import './animate.scss'; // 所有动画
88
- .ste-animate-root {
89
- display: inline-block;
90
-
91
- &.ste-animate {
92
- animation-duration: 0.5s;
93
- animation-timing-function: ease-out;
94
- animation-fill-mode: both;
95
- }
96
-
97
- // 循环
98
- &.loop {
99
- animation-iteration-count: infinite !important;
100
- }
101
-
102
- // 横向抖动
103
- &.ste-animate-shakeX {
104
- animation-name: shakeX;
105
- }
106
-
107
- // 竖向抖动
108
- &.ste-animate-shakeY {
109
- animation-name: shakeY;
110
- }
111
-
112
- // 心跳
113
- &.ste-animate-ripple {
114
- animation-name: ripple;
115
- }
116
-
117
- // 漂浮
118
- &.ste-animate-float {
119
- position: relative;
120
- animation-name: floatPop;
121
- }
122
-
123
- // 呼吸灯
124
- &.ste-animate-breath {
125
- animation-name: breath;
126
- animation-duration: 2700ms;
127
- animation-timing-function: ease-in-out;
128
- animation-direction: alternate;
129
- }
130
-
131
- // 右侧向左侧划入
132
- &.ste-animate-slide-right {
133
- animation-name: slide-right;
134
- }
135
-
136
- // 右侧向左侧划入
137
- &.ste-animate-slide-left {
138
- animation-name: slide-left;
139
- }
140
-
141
- // 上面向下面划入
142
- &.ste-animate-slide-top {
143
- animation-name: slide-top;
144
- }
145
-
146
- // 下面向上面划入
147
- &.ste-animate-slide-bottom {
148
- animation-name: slide-bottom;
149
- }
150
-
151
- &.ste-animate-jump {
152
- transform-origin: center center;
153
- animation: jump 0.7s linear;
154
- }
155
-
156
- &.ste-animate-twinkle {
157
- position: relative;
158
-
159
- &::after,
160
- &::before {
161
- position: absolute;
162
- right: 50%;
163
- z-index: 1;
164
- box-sizing: border-box;
165
- width: 60px;
166
- height: 60px;
167
- margin-top: -15px;
168
- margin-right: -30px;
169
- content: '';
170
- border: 4rpx solid rgba(255, 255, 255, 0.6);
171
- border-radius: 30px;
172
- transform: scale(0);
173
- animation: twinkle 2s ease-out infinite;
174
- }
175
-
176
- &::after {
177
- animation-delay: 0.4s;
178
- }
179
- }
180
-
181
- &.ste-animate-flicker {
182
- position: relative;
183
- overflow: hidden;
184
-
185
- &::after {
186
- position: absolute;
187
- top: -2rpx;
188
- left: 0;
189
- width: 200rpx;
190
- height: 102%;
191
- content: '';
192
- background-image: linear-gradient(106deg, rgba(232, 224, 255, 0) 24%, #e8e0ff 91%);
193
- filter: blur(6rpx);
194
- opacity: 0.73;
195
- transform: skew(-20deg);
196
- animation: flicker 1.5s linear infinite;
197
- }
198
- }
199
- }
200
- </style>
1
+ <template>
2
+ <view class="ste-animate-root ste-animate" :class="[cmpRootClass]" :style="[cmpRootStyle]" @click="handleClick">
3
+ <slot></slot>
4
+ </view>
5
+ </template>
6
+
7
+ <script>
8
+ /**
9
+ * ste-animate 动画
10
+ * @description 动画组件
11
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-animate
12
+ */
13
+ export default {
14
+ group: '展示组件',
15
+ title: 'Animate 动画',
16
+ name: 'ste-animate',
17
+ options: {
18
+ virtualHost: true,
19
+ },
20
+ props: {
21
+ show: {
22
+ type: [Boolean, null],
23
+ default: false,
24
+ },
25
+ type: {
26
+ type: [String, null],
27
+ default: '',
28
+ },
29
+ loop: {
30
+ type: [Boolean, null],
31
+ default: false,
32
+ },
33
+ duration: {
34
+ type: [Number, null],
35
+ default: 300,
36
+ },
37
+ action: {
38
+ type: [String, null],
39
+ default: '',
40
+ },
41
+ },
42
+ data() {
43
+ return {
44
+ animationFlag: false, // 通过此标识控制动画执行
45
+ };
46
+ },
47
+ computed: {
48
+ cmpRootClass() {
49
+ let classArr = [];
50
+ if (this.type && (this.action === 'initial' || this.animationFlag || this.loop)) {
51
+ classArr.push(`ste-animate-${this.type}`);
52
+ }
53
+ if (this.loop) {
54
+ classArr.push('loop');
55
+ }
56
+ return classArr.join(' ');
57
+ },
58
+ cmpRootStyle() {
59
+ let style = {};
60
+ if (this.duration) {
61
+ style.animationDuration = this.duration;
62
+ }
63
+ return style;
64
+ },
65
+ },
66
+ watch: {
67
+ show: {
68
+ handler(val) {
69
+ if (val) {
70
+ this.animated();
71
+ }
72
+ },
73
+ },
74
+ },
75
+ methods: {
76
+ handleClick() {
77
+ if (this.action === 'click') {
78
+ this.animated();
79
+ }
80
+ },
81
+ animated() {
82
+ this.animationFlag = false;
83
+ setTimeout(() => {
84
+ this.animationFlag = true;
85
+ }, 10);
86
+ },
87
+ },
88
+ };
89
+ </script>
90
+
91
+ <style lang="scss" scoped>
92
+ @import './animate.scss'; // 所有动画
93
+
94
+ .ste-animate-root {
95
+ display: inline-block;
96
+
97
+ &.ste-animate {
98
+ animation-duration: 0.5s;
99
+ animation-timing-function: ease-out;
100
+ animation-fill-mode: both;
101
+ }
102
+
103
+ // 循环
104
+ &.loop {
105
+ animation-iteration-count: infinite !important;
106
+ }
107
+
108
+ // 横向抖动
109
+ &.ste-animate-shakeX {
110
+ animation-name: shakeX;
111
+ }
112
+
113
+ // 竖向抖动
114
+ &.ste-animate-shakeY {
115
+ animation-name: shakeY;
116
+ }
117
+
118
+ // 心跳
119
+ &.ste-animate-ripple {
120
+ animation-name: ripple;
121
+ }
122
+
123
+ // 漂浮
124
+ &.ste-animate-float {
125
+ position: relative;
126
+ animation-name: floatPop;
127
+ }
128
+
129
+ // 呼吸灯
130
+ &.ste-animate-breath {
131
+ animation-name: breath;
132
+ animation-duration: 2700ms;
133
+ animation-timing-function: ease-in-out;
134
+ animation-direction: alternate;
135
+ }
136
+
137
+ // 右侧向左侧划入
138
+ &.ste-animate-slide-right {
139
+ animation-name: slide-right;
140
+ }
141
+
142
+ // 右侧向左侧划入
143
+ &.ste-animate-slide-left {
144
+ animation-name: slide-left;
145
+ }
146
+
147
+ // 上面向下面划入
148
+ &.ste-animate-slide-top {
149
+ animation-name: slide-top;
150
+ }
151
+
152
+ // 下面向上面划入
153
+ &.ste-animate-slide-bottom {
154
+ animation-name: slide-bottom;
155
+ }
156
+
157
+ &.ste-animate-jump {
158
+ transform-origin: center center;
159
+ animation: jump 0.7s linear;
160
+ }
161
+
162
+ &.ste-animate-twinkle {
163
+ position: relative;
164
+
165
+ &::after,
166
+ &::before {
167
+ position: absolute;
168
+ right: 50%;
169
+ z-index: 1;
170
+ box-sizing: border-box;
171
+ width: 60px;
172
+ height: 60px;
173
+ margin-top: -15px;
174
+ margin-right: -30px;
175
+ content: '';
176
+ border: 4rpx solid rgba(255, 255, 255, 0.6);
177
+ border-radius: 30px;
178
+ transform: scale(0);
179
+ animation: twinkle 2s ease-out infinite;
180
+ }
181
+
182
+ &::after {
183
+ animation-delay: 0.4s;
184
+ }
185
+ }
186
+
187
+ &.ste-animate-flicker {
188
+ position: relative;
189
+ overflow: hidden;
190
+
191
+ &::after {
192
+ position: absolute;
193
+ top: -2rpx;
194
+ left: 0;
195
+ width: 200rpx;
196
+ height: 102%;
197
+ content: '';
198
+ background-image: linear-gradient(106deg, rgba(232, 224, 255, 0) 24%, #e8e0ff 91%);
199
+ filter: blur(6rpx);
200
+ opacity: 0.73;
201
+ transform: skew(-20deg);
202
+ animation: flicker 1.5s linear infinite;
203
+ }
204
+ }
205
+ }
206
+ </style>
@@ -26,7 +26,7 @@ import utils from '../../utils/utils.js';
26
26
  /**
27
27
  * ste-badge 徽标
28
28
  * @description 徽标组件
29
- * @tutorial https://stellar-ui.intecloud.com.cn/pc/index/index?name=ste-badge
29
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-badge
30
30
  * @property {Number|String} content 徽标内容
31
31
  * @property {String} background 背景 默认 #ee0a24
32
32
  * @property {Boolean} showDot 是否展示为小红点 默认 false
@@ -117,20 +117,20 @@ export default {
117
117
 
118
118
  switch (this.position) {
119
119
  case 'topLeft':
120
- style.left = utils.addUnit(this.offsetX);
121
- style.top = utils.addUnit(this.offsetY);
120
+ style.left = utils.formatPx(this.offsetX);
121
+ style.top = utils.formatPx(this.offsetY);
122
122
  break;
123
123
  case 'bottomLeft':
124
- style.left = utils.addUnit(this.offsetX);
125
- style.bottom = utils.addUnit(this.offsetY);
124
+ style.left = utils.formatPx(this.offsetX);
125
+ style.bottom = utils.formatPx(this.offsetY);
126
126
  break;
127
127
  case 'bottomRight':
128
- style.right = utils.addUnit(this.offsetX);
129
- style.bottom = utils.addUnit(this.offsetY);
128
+ style.right = utils.formatPx(this.offsetX);
129
+ style.bottom = utils.formatPx(this.offsetY);
130
130
  break;
131
131
  default:
132
- style.right = utils.addUnit(this.offsetX);
133
- style.top = utils.addUnit(this.offsetY);
132
+ style.right = utils.formatPx(this.offsetX);
133
+ style.top = utils.formatPx(this.offsetY);
134
134
  break;
135
135
  }
136
136
  }
@@ -14,7 +14,7 @@
14
14
  /**
15
15
  * ste-barcode 条形码
16
16
  * @description 条形码组件
17
- * @tutorial https://stellar-ui.intecloud.com.cn/pc/index/index?name=ste-barcode
17
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-barcode
18
18
  * @property {String} content 条形码内容(仅支持数字和字母)
19
19
  * @property {Number} width 条形码宽度,单位`px`
20
20
  * @property {Number} height 条形码高度,单位`px`
@@ -65,7 +65,7 @@ let color = useColor();
65
65
  /**
66
66
  * ste-button 按钮
67
67
  * @description 按钮组件
68
- * @tutorial https://stellar-ui.intecloud.com.cn/pc/index/index?name=ste-button
68
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-button
69
69
  * @property {Number} mode 尺寸 默认值 200
70
70
  * @value 100 小 {Number}
71
71
  * @value 200 中 {Number}
@@ -68,7 +68,7 @@ let color = useColor();
68
68
  /**
69
69
  * ste-calendar 日历
70
70
  * @description 日历组件
71
- * @tutorial https://stellar-ui.intecloud.com.cn/pc/index/index?name=ste-calendar
71
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-calendar
72
72
  * @property {String} title 标题
73
73
  * @property {Boolean} showTitle 是否显示标题
74
74
  * @property {Array} list 默认选中的日期
@@ -21,7 +21,7 @@ let color = useColor();
21
21
  /**
22
22
  * ste-checkbox 复选框
23
23
  * @description 复选框组件,在一组备选项中进行多选。
24
- * @tutorial https://stellar-ui.intecloud.com.cn/pc/index/index?name=ste-checkbox
24
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-checkbox
25
25
  * @property {Boolean} value 当前选中值(支持v-model双向绑定) 默认 false
26
26
  * @property {Number|String} name 选项的值
27
27
  * @property {Boolean} disabled 禁用 默认 false
@@ -8,7 +8,7 @@
8
8
  /**
9
9
  * ste-checkbox-group 复选框组
10
10
  * @description 复选框组组件,内部由多个checkbox组成。
11
- * @tutorial https://stellar-ui.intecloud.com.cn/pc/index/index?name=ste-checkbox
11
+ * @tutorial https://stellar-ui.intecloud.com.cn/?projectName=stellar-ui&menu=%E7%BB%84%E4%BB%B6&active=ste-checkbox
12
12
  * @property {Array} value 当前选中值(支持v-model双向绑定)
13
13
  * @property {String} direction 排列方式 默认 column
14
14
  * @value row 横向 默认 {{String}}