stellar-ui-v2 1.35.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.
Files changed (141) hide show
  1. package/common/css/common.scss +61 -0
  2. package/components/ste-animate/README.md +117 -0
  3. package/components/ste-animate/animate.scss +247 -0
  4. package/components/ste-animate/ste-animate.vue +200 -0
  5. package/components/ste-badge/README.md +171 -0
  6. package/components/ste-badge/ste-badge.vue +238 -0
  7. package/components/ste-barcode/README.md +36 -0
  8. package/components/ste-barcode/encode2.js +317 -0
  9. package/components/ste-barcode/ste-barcode.vue +213 -0
  10. package/components/ste-button/README.md +129 -0
  11. package/components/ste-button/ste-button.vue +345 -0
  12. package/components/ste-calendar/README.md +304 -0
  13. package/components/ste-calendar/self-date.js +119 -0
  14. package/components/ste-calendar/ste-calendar.vue +578 -0
  15. package/components/ste-checkbox/README.md +297 -0
  16. package/components/ste-checkbox/ste-checkbox.vue +305 -0
  17. package/components/ste-checkbox-group/ste-checkbox-group.vue +133 -0
  18. package/components/ste-code-input/README.md +67 -0
  19. package/components/ste-code-input/ste-code-input.vue +302 -0
  20. package/components/ste-date-picker/README.md +135 -0
  21. package/components/ste-date-picker/ste-date-picker.vue +407 -0
  22. package/components/ste-drag/README.md +103 -0
  23. package/components/ste-drag/ste-drag.vue +203 -0
  24. package/components/ste-dropdown-menu/README.md +358 -0
  25. package/components/ste-dropdown-menu/ste-dropdown-menu.vue +405 -0
  26. package/components/ste-dropdown-menu-item/ste-dropdown-menu-item.vue +176 -0
  27. package/components/ste-icon/README.md +90 -0
  28. package/components/ste-icon/iconfont.css +8 -0
  29. package/components/ste-icon/ste-icon.vue +147 -0
  30. package/components/ste-image/README.md +154 -0
  31. package/components/ste-image/ste-image.vue +218 -0
  32. package/components/ste-index-item/ste-index-item.vue +96 -0
  33. package/components/ste-index-list/README.md +153 -0
  34. package/components/ste-index-list/ste-index-list.vue +128 -0
  35. package/components/ste-input/README.md +146 -0
  36. package/components/ste-input/ste-input.vue +480 -0
  37. package/components/ste-loading/README.md +81 -0
  38. package/components/ste-loading/ste-loading.vue +166 -0
  39. package/components/ste-media-preview/README.md +243 -0
  40. package/components/ste-media-preview/TouchScaleing.js +102 -0
  41. package/components/ste-media-preview/ste-media-preview.vue +267 -0
  42. package/components/ste-message-box/README.md +217 -0
  43. package/components/ste-message-box/ste-message-box.js +72 -0
  44. package/components/ste-message-box/ste-message-box.vue +380 -0
  45. package/components/ste-notice-bar/README.md +129 -0
  46. package/components/ste-notice-bar/ste-notice-bar.vue +331 -0
  47. package/components/ste-number-keyboard/README.md +246 -0
  48. package/components/ste-number-keyboard/keyboard.vue +140 -0
  49. package/components/ste-number-keyboard/ste-number-keyboard.vue +240 -0
  50. package/components/ste-picker/ste-picker.vue +258 -0
  51. package/components/ste-popup/README.md +148 -0
  52. package/components/ste-popup/ste-popup.vue +337 -0
  53. package/components/ste-price/README.md +129 -0
  54. package/components/ste-price/ste-price.vue +258 -0
  55. package/components/ste-progress/README.md +87 -0
  56. package/components/ste-progress/ste-progress.vue +200 -0
  57. package/components/ste-qrcode/README.md +50 -0
  58. package/components/ste-qrcode/ste-qrcode.vue +164 -0
  59. package/components/ste-qrcode/uqrcode.js +34 -0
  60. package/components/ste-radio/README.md +286 -0
  61. package/components/ste-radio/ste-radio.vue +293 -0
  62. package/components/ste-radio-group/ste-radio-group.vue +128 -0
  63. package/components/ste-rate/README.md +115 -0
  64. package/components/ste-rate/ste-rate.vue +202 -0
  65. package/components/ste-read-more/README.md +111 -0
  66. package/components/ste-read-more/ste-read-more.vue +133 -0
  67. package/components/ste-rich-text/README.md +31 -0
  68. package/components/ste-rich-text/ste-rich-text.vue +70 -0
  69. package/components/ste-scroll-to/README.md +68 -0
  70. package/components/ste-scroll-to/mixin.js +173 -0
  71. package/components/ste-scroll-to/ste-scroll-to.vue +45 -0
  72. package/components/ste-scroll-to-item/ste-scroll-to-item.vue +25 -0
  73. package/components/ste-search/README.md +262 -0
  74. package/components/ste-search/ste-search.vue +547 -0
  75. package/components/ste-select/README.md +434 -0
  76. package/components/ste-select/datapager.vue +62 -0
  77. package/components/ste-select/datetime.vue +106 -0
  78. package/components/ste-select/defaultDate.js +142 -0
  79. package/components/ste-select/ste-select.vue +843 -0
  80. package/components/ste-signature/README.md +105 -0
  81. package/components/ste-signature/ste-signature.vue +220 -0
  82. package/components/ste-slider/README.md +165 -0
  83. package/components/ste-slider/ste-slider.vue +544 -0
  84. package/components/ste-step/ste-step.vue +264 -0
  85. package/components/ste-stepper/README.md +170 -0
  86. package/components/ste-stepper/ste-stepper.vue +373 -0
  87. package/components/ste-steps/README.md +132 -0
  88. package/components/ste-steps/ste-steps.vue +65 -0
  89. package/components/ste-sticky/README.md +52 -0
  90. package/components/ste-sticky/ste-sticky.vue +127 -0
  91. package/components/ste-swipe-action/README.md +197 -0
  92. package/components/ste-swipe-action/ste-swipe-action.vue +303 -0
  93. package/components/ste-swipe-action-group/ste-swipe-action-group.vue +104 -0
  94. package/components/ste-swiper/README.md +173 -0
  95. package/components/ste-swiper/ste-swiper.vue +462 -0
  96. package/components/ste-swiper-item/ste-swiper-item.vue +41 -0
  97. package/components/ste-switch/README.md +110 -0
  98. package/components/ste-switch/ste-switch.vue +144 -0
  99. package/components/ste-tab/ste-tab.vue +87 -0
  100. package/components/ste-table/README.md +785 -0
  101. package/components/ste-table/common.js +8 -0
  102. package/components/ste-table/ste-table.vue +666 -0
  103. package/components/ste-table/utils.js +20 -0
  104. package/components/ste-table-column/checkbox-icon.vue +65 -0
  105. package/components/ste-table-column/common.scss +65 -0
  106. package/components/ste-table-column/radio-icon.vue +110 -0
  107. package/components/ste-table-column/ste-table-column.vue +255 -0
  108. package/components/ste-table-column/sub-table.vue +116 -0
  109. package/components/ste-table-column/table-popover.vue +204 -0
  110. package/components/ste-table-column/var.scss +1 -0
  111. package/components/ste-tabs/README.md +475 -0
  112. package/components/ste-tabs/props.js +212 -0
  113. package/components/ste-tabs/ste-tabs.vue +758 -0
  114. package/components/ste-text/README.md +66 -0
  115. package/components/ste-text/ste-text.vue +72 -0
  116. package/components/ste-toast/README.md +243 -0
  117. package/components/ste-toast/ste-toast.js +69 -0
  118. package/components/ste-toast/ste-toast.vue +231 -0
  119. package/components/ste-touch-swipe/README.md +104 -0
  120. package/components/ste-touch-swipe/TouchEvent.js +72 -0
  121. package/components/ste-touch-swipe/ste-touch-swipe.vue +327 -0
  122. package/components/ste-touch-swipe-item/ste-touch-swipe-item.vue +33 -0
  123. package/components/ste-tour/README.md +194 -0
  124. package/components/ste-tour/ste-tour.vue +355 -0
  125. package/components/ste-tree/README.md +240 -0
  126. package/components/ste-tree/ste-tree.vue +350 -0
  127. package/components/ste-upload/README.md +276 -0
  128. package/components/ste-upload/ReadFile.js +229 -0
  129. package/components/ste-upload/ste-upload.vue +526 -0
  130. package/components/ste-video/README.md +60 -0
  131. package/components/ste-video/props.js +149 -0
  132. package/components/ste-video/ste-video.vue +647 -0
  133. package/config/color.js +22 -0
  134. package/index.js +2 -0
  135. package/package.json +19 -0
  136. package/utils/Color.js +66 -0
  137. package/utils/System.js +110 -0
  138. package/utils/dayjs.min.js +1 -0
  139. package/utils/mixin.js +67 -0
  140. package/utils/store.js +7 -0
  141. package/utils/utils.js +604 -0
@@ -0,0 +1,264 @@
1
+ <template>
2
+ <view class="ste-step" :class="[`ste-step-${cmpDirection}`]" :style="[cmpStyle]">
3
+ <view class="ste-step-head" :class="cmpDot ? 'head-is-dot' : ''">
4
+ <view class="ste-step-line" v-if="cmpIndex < childrenLen"></view>
5
+ <view
6
+ class="ste-step-icon"
7
+ :class="[!cmpDot ? ($slots.icon || icon ? '' : cmpStatusObj.icon ? 'is-icon' : 'is-text') : 'is-dot']"
8
+ @click="clickStep"
9
+ >
10
+ <template v-if="$slots.icon">
11
+ <slot name="icon"></slot>
12
+ </template>
13
+ <template v-else-if="cmpDot"></template>
14
+ <template v-else-if="cmpStatusObj.icon">
15
+ <ste-icon
16
+ class="ste-step-icon-inner"
17
+ :code="cmpStatusObj.icon"
18
+ :size="icon ? 40 : 20"
19
+ :color="cmpStatusObj.color"
20
+ ></ste-icon>
21
+ </template>
22
+ <template v-else>
23
+ <view class="ste-step-inner">{{ cmpIndex }}</view>
24
+ </template>
25
+ </view>
26
+ </view>
27
+ <view class="ste-step-content" :class="[`ste-step-content-${steps.direction}`]">
28
+ <view class="ste-step-title" @click="clickStep">
29
+ <span v-if="!$slots.title">
30
+ {{ title ? title : `第${cmpIndex}步` }}
31
+ </span>
32
+ <slot name="title"></slot>
33
+ </view>
34
+ <view class="ste-step-desc" v-if="description || $slots.description">
35
+ <span v-if="!$slots.description" v-html="description"></span>
36
+ <slot name="description"></slot>
37
+ </view>
38
+ </view>
39
+ </view>
40
+ </template>
41
+ <script>
42
+ import utils from '../../utils/utils.js';
43
+ import useColor from '../../config/color.js';
44
+ let color = useColor();
45
+ /**
46
+ * ste-steps 步骤条
47
+ * @description 步骤条组件,拆分展示某项流程的步骤,引导用户按流程完成任务或向用户展示当前状态。。
48
+ * @tutorial https://stellar-ui.intecloud.com.cn/pc/index/index?name=ste-steps
49
+ * @property {String} title 流程步骤的标题
50
+ * @property {String} description 流程步骤的描述性文字(支持 html 结构)
51
+ * @property {String} icon 图标
52
+ * @property {String} status 步骤状态
53
+ */
54
+ export default {
55
+ name: 'ste-step',
56
+ options: {
57
+ virtualHost: true,
58
+ },
59
+ props: {
60
+ title: {
61
+ type: [String, null],
62
+ default: '',
63
+ },
64
+ description: {
65
+ type: [String, null],
66
+ default: '',
67
+ },
68
+ icon: {
69
+ type: [String, null],
70
+ default: '',
71
+ },
72
+ status: {
73
+ type: [String, null],
74
+ default: null,
75
+ },
76
+ },
77
+ inject: {
78
+ steps: {
79
+ default: '',
80
+ },
81
+ },
82
+ data() {
83
+ return {
84
+ childrenLen: 0,
85
+ };
86
+ },
87
+ computed: {
88
+ cmpDirection() {
89
+ return this.steps.direction;
90
+ },
91
+ cmpDot() {
92
+ return this.steps.dot;
93
+ },
94
+ cmpIndex() {
95
+ this.$nextTick(() => {
96
+ // #ifdef H5
97
+ this.childrenLen = this.steps.$children[0].$children.length;
98
+ // #endif
99
+ // #ifndef H5
100
+ this.childrenLen = this.steps.$children.length;
101
+ // #endif
102
+ });
103
+ // #ifdef H5
104
+ return this.steps.$children[0].$children.length;
105
+ // #endif
106
+ // #ifndef H5
107
+ return this.steps.$children.length;
108
+ // #endif
109
+ },
110
+ cmpStatusObj() {
111
+ let obj = {};
112
+ let status = '';
113
+ // status不是默认配置 优先级最高
114
+ if (this.status) {
115
+ status = this.status;
116
+ } else {
117
+ status = this.steps.active >= this.cmpIndex ? 'finished' : 'process';
118
+ }
119
+ obj.textColor = this.steps.active + 1 >= this.cmpIndex ? color.getColor().steThemeColor : '#cccccc';
120
+ if (status == 'finished') {
121
+ obj.color = color.getColor().steThemeColor;
122
+ obj.icon = '&#xe67a;';
123
+ }
124
+ if (status == 'process') {
125
+ obj.color = obj.textColor;
126
+ obj.icon = '';
127
+ }
128
+ if (status == 'error') {
129
+ obj.color = '#FF1A00';
130
+ obj.icon = '&#xe67b;';
131
+ obj.textColor = '#FF1A00';
132
+ }
133
+ obj.icon = this.icon ? this.icon : obj.icon;
134
+ obj.bgColor = this.steps.active + 1 == this.cmpIndex ? color.getColor().steThemeColor : '#ffffff';
135
+ obj.numColor = this.steps.active + 1 >= this.cmpIndex ? '#ffffff' : '#cccccc';
136
+ obj.descColor = this.steps.active + 1 >= this.cmpIndex ? '#999999' : '#cccccc';
137
+ obj.lineColor = this.steps.active >= this.cmpIndex ? color.getColor().steThemeColor : '#EEEEEE';
138
+ obj.dotColor = this.steps.active + 1 >= this.cmpIndex ? color.getColor().steThemeColor : '#DDDDDD';
139
+ return obj;
140
+ },
141
+ cmpStyle() {
142
+ return {
143
+ '---color': this.cmpStatusObj.textColor,
144
+ '---bg-color': this.cmpStatusObj.bgColor,
145
+ '---num-color': this.cmpStatusObj.numColor,
146
+ '---desc-color': this.cmpStatusObj.descColor,
147
+ '---line-color': this.cmpStatusObj.lineColor,
148
+ '---dot-color': this.cmpStatusObj.dotColor,
149
+ };
150
+ },
151
+ },
152
+ methods: {
153
+ clickStep() {
154
+ this.steps.$emit('click-step', this.cmpIndex);
155
+ },
156
+ },
157
+ };
158
+ </script>
159
+ <style lang="scss" scoped>
160
+ .ste-step-row {
161
+ display: block;
162
+ }
163
+
164
+ .ste-step-column {
165
+ display: flex;
166
+
167
+ .ste-step-line {
168
+ height: calc(4rpx + 100%) !important;
169
+ width: 2rpx !important;
170
+ }
171
+
172
+ .ste-step-content {
173
+ padding-left: 6% !important;
174
+ text-align: left !important;
175
+ }
176
+ }
177
+ .ste-step {
178
+ flex: 1;
179
+ font-size: 0;
180
+ text-align: center;
181
+
182
+ .head-is-dot {
183
+ top: 12rpx;
184
+ margin-bottom: 0 !important;
185
+ margin-top: 14rpx !important;
186
+
187
+ .ste-step-line {
188
+ top: 14rpx !important;
189
+ left: auto !important;
190
+ right: auto !important;
191
+ }
192
+
193
+ .ste-step-icon {
194
+ box-sizing: content-box;
195
+ height: 16rpx !important;
196
+ width: 16rpx !important;
197
+ line-height: 16rpx !important;
198
+ background-color: var(---dot-color);
199
+ border-radius: 50%;
200
+ }
201
+ }
202
+ .ste-step-head {
203
+ border-color: var(---color);
204
+ color: var(---num-color);
205
+ display: flex;
206
+ justify-content: center;
207
+ margin-bottom: 22rpx;
208
+ position: relative;
209
+
210
+ .ste-step-line {
211
+ background: var(---line-color);
212
+ display: inline-block;
213
+ position: absolute;
214
+ height: 2rpx;
215
+ left: 50%;
216
+ right: -50%;
217
+ top: 20rpx;
218
+ }
219
+ .ste-step-icon.is-icon {
220
+ border-radius: 50%;
221
+ border-style: solid;
222
+ border-width: 2rpx;
223
+ border-color: var(---color);
224
+ background-color: #ffffff;
225
+ }
226
+ .ste-step-icon.is-text {
227
+ border-radius: 50%;
228
+ border-style: solid;
229
+ border-width: 2rpx;
230
+ background-color: var(---bg-color);
231
+ }
232
+ .ste-step-icon {
233
+ display: flex;
234
+ align-items: center;
235
+ justify-content: center;
236
+ position: relative;
237
+ font-size: 24rpx;
238
+ height: 40rpx;
239
+ line-height: 40rpx;
240
+ width: 40rpx;
241
+ }
242
+ .ste-step-icon-inner {
243
+ align-items: center;
244
+ display: flex;
245
+ justify-content: center;
246
+ }
247
+ }
248
+ .ste-step-content {
249
+ display: inline-block;
250
+ text-align: center;
251
+ .ste-step-title {
252
+ font-size: 32rpx;
253
+ color: var(---color);
254
+ line-height: 44rpx;
255
+ }
256
+ .ste-step-desc {
257
+ line-height: 44rpx;
258
+ font-size: 28rpx;
259
+ color: var(---desc-color);
260
+ margin-top: 8rpx;
261
+ }
262
+ }
263
+ }
264
+ </style>
@@ -0,0 +1,170 @@
1
+ # Stepper 步进器
2
+
3
+ 步进器由增加按钮、减少按钮和输入框组成,用于在一定范围内输入、调整数字。
4
+
5
+ ---$
6
+
7
+ ### 代码演示
8
+ JavaScript后面的演示代码中涉及到的变量和方法都使用本javasaript代码
9
+ ```javascript
10
+ export default {
11
+ data() {
12
+ return {
13
+ value1: 10,
14
+ value2: 7,
15
+ value3: 2,
16
+ value4: 5.8,
17
+ value5: 5,
18
+ value6: 6,
19
+ value7: 7,
20
+ value8: 8,
21
+ value9: 9,
22
+ value10: 10,
23
+ value11: 11,
24
+ value12: 12,
25
+ value13: 13,
26
+ value14: 14,
27
+ value15: 15,
28
+ value16: 16,
29
+ value17: 17,
30
+ value18: 18,
31
+ value19: 19,
32
+ };
33
+ },
34
+ methods: {
35
+ blur(event) {
36
+ this.showToast({
37
+ icon: 'none',
38
+ title: `失焦事件`,
39
+ });
40
+ },
41
+ focus() {
42
+ this.showToast({
43
+ icon: 'none',
44
+ title: `聚焦事件`,
45
+ });
46
+ },
47
+ click1(value) {
48
+ this.showToast({
49
+ icon: 'none',
50
+ title: `点击按钮:${value} 输入值`,
51
+ });
52
+ },
53
+ click2(value, allowStop, resolve) {
54
+ this.showToast({
55
+ icon: 'none',
56
+ title: `点击按钮:${value} 输入值`,
57
+ });
58
+ // 阻止change事件
59
+ allowStop();
60
+ },
61
+ change(value) {
62
+ setTimeout(() => {
63
+ this.showToast({
64
+ icon: 'none',
65
+ title: `改变:${value} 输入值`,
66
+ });
67
+ }, 1000);
68
+ },
69
+ },
70
+ };
71
+ ```
72
+
73
+ #### 基础用法
74
+ 通过`value`属性,双向绑定,设置输入值
75
+ ```
76
+ <ste-stepper v-model="value1"></ste-stepper>
77
+ ```
78
+
79
+ #### 限制输入范围
80
+ 通过 `min` 和 `max` 属性限制输入值的范围,默认超出范围后会自动校正最大值(默认值:`Infinity`)或最小值(默认值:`0`)
81
+ ```
82
+ <ste-stepper v-model="value2" :min="5" :max="15"></ste-stepper>
83
+ ```
84
+
85
+ #### 步长设置
86
+ 通过 `step` 属性设置每次点击增加或减少按钮时变化的值,默认为 1。
87
+ ```
88
+ <ste-stepper v-model="value3" :step="2"></ste-stepper>
89
+ ```
90
+
91
+ #### 数值精度
92
+ 通过 `precision` 属性设置输入值的小数位,默认为 1。
93
+ ```
94
+ <ste-stepper v-model="value4" :precision="1"></ste-stepper>
95
+ ```
96
+
97
+ #### 自定义大小
98
+ 通过 `inputWidth` 属性设置输入框宽度,通过 `buttonSize` 属性设置按钮大小和输入框高度。
99
+ ```
100
+ <ste-stepper v-model="value5" inputWidth="100" btnSize="70"></ste-stepper>
101
+ ```
102
+
103
+ #### 主色
104
+ 通过 `mainColor` 属性设置步进器的主色,对`theme`为`line`时无效。
105
+ ```
106
+ <ste-stepper v-model="value5" inputWidth="100" btnSize="70"></ste-stepper>
107
+ ```
108
+
109
+ #### 禁用
110
+ - 通过 `disabled` 属性设置禁用步进器,默认为 `false`。
111
+ - 通过 `disablePlus` 属性设置禁用增加按钮,默认为 `false`。
112
+ - 通过 `disableMinus` 属性设置禁用减少按钮,默认为 `false`。
113
+ - 通过 `disableInput` 属性设置禁用输入框,默认为 `false`。
114
+ ```
115
+ <ste-stepper v-model="value7" disabled></ste-stepper>
116
+ <ste-stepper v-model="value8" disablePlus></ste-stepper>
117
+ <ste-stepper v-model="value9" disableInput></ste-stepper>
118
+ <ste-stepper v-model="value10" disableMinus></ste-stepper>
119
+ ```
120
+
121
+ #### 样式风格:线性风格
122
+ 通过 `theme` 属性设置步进器的样式风格,设置为线性 `line`,默认为 `card`。
123
+ ```
124
+ <ste-stepper v-model="value11" theme="line"></ste-stepper>
125
+ <ste-stepper v-model="value12" theme="line" disabled></ste-stepper>
126
+ <ste-stepper v-model="value13" theme="line" disablePlus></ste-stepper>
127
+ <ste-stepper v-model="value14" theme="line" disableInput></ste-stepper>
128
+ <ste-stepper v-model="value15" theme="line" disableMinus></ste-stepper>
129
+ ```
130
+
131
+ ---$
132
+ ### API
133
+ #### 组件属性(Props)
134
+
135
+ | 参数 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
136
+ | --- | --- | --- | --- | --- | --- |
137
+ | `value` | 当前输入的值,支持双向绑定 | `Number` | `1` | - | - |
138
+ | `min` | 最小值 | `Number` | `0` | - | - |
139
+ | `max` | 最大值 | `Number` | `Infinity` | - | - |
140
+ | `step` | 步长,每次加或减的值 | `Number` | `1` | - | - |
141
+ | `precision` | 数值精度 | `Number` | `0` | - | - |
142
+ | `inputWidth` | 输入框宽度,默认单位为`rpx` | `Number/String` | `64` | - | - |
143
+ | `btnSize` | 按钮大小以及输入框高度,默认单位为`rpx`,`theme`为`line`时 高为宽的80% | `Number/String` | `card` : `48` </br> `line` : `60` | - | - |
144
+ | `mainColor` | 主色,对`theme`为`line`时无效 | `String` | `#0090FF` | - | - |
145
+ | `disabled` | 是否禁用步进器 | `Boolean` | `false` | - | - |
146
+ | `disablePlus` | 是否禁用增加按钮 | `Boolean` | `false` | - | - |
147
+ | `disableMinus`| 是否禁用减少按钮 | `Boolean` | `false` | - | - |
148
+ | `disablelnput`| 是否禁用输入框 | `Boolean` | `false` | - | - |
149
+ | `theme` | 是否禁用输入框 | `String` | `card` | `card`:面型</br>`line`:线型</br>`add`:纯加购按钮 | - |
150
+ 徽标属性
151
+ | `background` | 背景 | `String` | `#ee0a24` | - | - |
152
+ | `showDot` | 是否展示为小红点 | `Boolean` | `true` | - | - |
153
+ | `position` | 徽标位置 | `String` | `topRight`| topRight:上右<br/>topLeft:上左<br/>bottomLeft:下左<br/>bottomRight:下右 | - |
154
+ | `offsetX` | x轴偏移量 | `Number/String` | `auto` | - | - |
155
+ | `offsetY` | y轴偏移量 | `Number/String` | `auto` | - | - |
156
+ | `showZero` | 当 content 为数字 0 或字符串 '0' 时,是否展示徽标 | `Boolean` | `true` | - | - |
157
+ | `badgeMax` | 最大值,超过最大值会显示 {max}+,仅当 content 为数字时有效,当 content 为数字 0 时不处理 | `Number` | `99` | 0:当 content 为数字 0 时不处理<br/>{{Number}}:超过最大值会显示 {max}+ | - |
158
+
159
+
160
+ #### Events
161
+ |事件名 |说明 |事件参数 |支持版本 |
162
+ |--- |--- |--- |--- |
163
+ | `change` |当绑定值变化时触发的事件 | `value`:改变后的绑定值 | - |
164
+ | `plus` |点击增加按钮时触发(可拦截change事件) | `value`:当前的绑定值,`allowStop`:允许阻止后续的事件触发,:`resolve`:后续的事件执行 | - |
165
+ | `minus` |点击减少按钮时触发(可拦截change事件) | `value`:当前的绑定值,`allowStop`:允许阻止后续的事件触发,:`resolve`:后续的事件执行 | - |
166
+ | `focus` |输入框聚焦时触发 | `event` | - |
167
+ | `blur` |输入框失焦时触发 | `event` | - |
168
+
169
+ ---$
170
+ {{qinpengfei}}