@10yun/cv-mobile-ui 0.5.30 → 0.5.31
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/package.json +5 -1
- package/ui-cv/components/cv-btn-base/cv-btn-base.vue +1 -1
- package/uview-plus/README.md +1 -1
- package/uview-plus/components/u-action-sheet/u-action-sheet.vue +8 -8
- package/uview-plus/components/u-album/u-album.vue +1 -1
- package/uview-plus/components/u-alert/u-alert.vue +5 -5
- package/uview-plus/components/u-app-update/u-app-update.vue +2 -2
- package/uview-plus/components/u-avatar/u-avatar.vue +2 -2
- package/uview-plus/components/u-avatar-group/u-avatar-group.vue +79 -3
- package/uview-plus/components/u-back-top/u-back-top.vue +4 -4
- package/uview-plus/components/u-badge/u-badge.vue +1 -1
- package/uview-plus/components/u-button/u-button.vue +8 -8
- package/uview-plus/components/u-button-wu/u-button-wu.vue +9 -9
- package/uview-plus/components/u-calendar/u-calendar.vue +5 -6
- package/uview-plus/components/u-car-keyboard/u-car-keyboard.vue +2 -2
- package/uview-plus/components/u-card/u-card.vue +139 -3
- package/uview-plus/components/u-cell/u-cell.vue +4 -4
- package/uview-plus/components/u-cell-group/u-cell-group.vue +2 -2
- package/uview-plus/components/u-checkbox/u-checkbox.vue +4 -4
- package/uview-plus/components/u-checkbox-group/u-checkbox-group.vue +1 -1
- package/uview-plus/components/u-code/u-code.vue +1 -1
- package/uview-plus/components/u-code-input/u-code-input.vue +1 -1
- package/uview-plus/components/u-col/u-col.vue +1 -1
- package/uview-plus/components/u-collapse/u-collapse.vue +2 -2
- package/uview-plus/components/u-collapse-item/u-collapse-item.vue +218 -3
- package/uview-plus/components/u-column-notice/u-column-notice.vue +3 -3
- package/uview-plus/components/u-count-down/u-count-down.vue +1 -1
- package/uview-plus/components/u-count-to/u-count-to.vue +1 -1
- package/uview-plus/components/u-datetime-picker/u-datetime-picker.vue +3 -3
- package/uview-plus/components/u-divider/u-divider.vue +3 -3
- package/uview-plus/components/u-dropdown/u-dropdown.vue +3 -3
- package/uview-plus/components/u-dropdown-item/u-dropdown-item.vue +1 -1
- package/uview-plus/components/u-empty/u-empty.vue +3 -3
- package/uview-plus/components/u-form-item/u-form-item.vue +4 -4
- package/uview-plus/components/u-gap/u-gap.vue +1 -1
- package/uview-plus/components/u-grid/u-grid.vue +1 -1
- package/uview-plus/components/u-grid-item/u-grid-item.vue +1 -1
- package/uview-plus/components/u-icon/u-icon.vue +1 -1
- package/uview-plus/components/u-icon/u-icon2.vue +1 -1
- package/uview-plus/components/u-image/u-image.vue +5 -5
- package/uview-plus/components/u-image-wu/u-image-wu.vue +5 -5
- package/uview-plus/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/uview-plus/components/u-index-list/u-index-list.vue +2 -2
- package/uview-plus/components/u-input/u-input.vue +4 -4
- package/uview-plus/components/u-keyboard/u-keyboard.vue +6 -6
- package/uview-plus/components/u-lazy-load/u-lazy-load.vue +257 -3
- package/uview-plus/components/u-line/u-line.vue +1 -1
- package/uview-plus/components/u-line-progress/u-line-progress.vue +1 -1
- package/uview-plus/components/u-link/u-link.vue +1 -1
- package/uview-plus/components/u-list/u-list.vue +1 -1
- package/uview-plus/components/u-list-item/u-list-item.vue +1 -1
- package/uview-plus/components/u-loading-icon/u-loading-icon.vue +191 -3
- package/uview-plus/components/u-loading-page/u-loading-page.vue +4 -4
- package/uview-plus/components/u-loadmore/u-loadmore.vue +4 -4
- package/uview-plus/components/u-mask/u-mask.vue +120 -113
- package/uview-plus/components/u-message-input/u-message-input.vue +1 -1
- package/uview-plus/components/u-modal/u-modal.vue +6 -6
- package/uview-plus/components/u-navbar/u-navbar.vue +4 -4
- package/uview-plus/components/u-navbar-mini/u-navbar-mini.vue +2 -2
- package/uview-plus/components/u-navbar-wu/u-navbar-wu.vue +4 -4
- package/uview-plus/components/u-no-network/u-no-network.vue +5 -5
- package/uview-plus/components/u-notice-bar/u-notice-bar.vue +5 -5
- package/uview-plus/components/u-notify/u-notify.vue +6 -6
- package/uview-plus/components/u-number-box/u-number-box.vue +9 -3
- package/uview-plus/components/u-number-keyboard/u-number-keyboard.vue +1 -1
- package/uview-plus/components/u-overlay/u-overlay.vue +3 -3
- package/uview-plus/components/u-picker/u-picker.vue +5 -5
- package/uview-plus/components/u-popup/u-popup.vue +8 -8
- package/uview-plus/components/u-popup-wu/u-popup-wu.vue +7 -7
- package/uview-plus/components/u-radio/u-radio.vue +4 -4
- package/uview-plus/components/u-radio-group/u-radio-group.vue +1 -1
- package/uview-plus/components/u-rate/u-rate.vue +5 -5
- package/uview-plus/components/u-read-more/u-read-more.vue +126 -3
- package/uview-plus/components/u-row/u-row.vue +1 -1
- package/uview-plus/components/u-row-notice/u-row-notice.vue +3 -3
- package/uview-plus/components/u-safe-bottom/u-safe-bottom.vue +48 -3
- package/uview-plus/components/u-search/u-search.vue +4 -4
- package/uview-plus/components/u-select/u-select.vue +175 -3
- package/uview-plus/components/u-skeleton/u-skeleton.vue +3 -3
- package/uview-plus/components/u-sku-wu/u-sku-wu.vue +4 -4
- package/uview-plus/components/u-status-bar/u-status-bar.vue +1 -1
- package/uview-plus/components/u-steps/u-steps.vue +1 -1
- package/uview-plus/components/u-steps-item/u-steps-item.vue +7 -7
- package/uview-plus/components/u-sticky/u-sticky.vue +1 -1
- package/uview-plus/components/u-subsection/u-subsection.vue +1 -1
- package/uview-plus/components/u-swipe-action/u-swipe-action.vue +1 -1
- package/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue +3 -3
- package/uview-plus/components/u-swiper/u-swiper.vue +1 -1
- package/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue +1 -1
- package/uview-plus/components/u-switch/u-switch.vue +2 -2
- package/uview-plus/components/u-tabbar/u-tabbar.vue +2 -2
- package/uview-plus/components/u-tabbar-item/u-tabbar-item.vue +9 -4
- package/uview-plus/components/u-table/u-table.vue +1 -1
- package/uview-plus/components/u-tabs/u-tabs.vue +3 -3
- package/uview-plus/components/u-tag/u-tag.vue +5 -5
- package/uview-plus/components/u-text/u-text.vue +159 -3
- package/uview-plus/components/u-toast/u-toast.vue +8 -8
- package/uview-plus/components/u-tooltip/u-tooltip.vue +6 -6
- package/uview-plus/components/u-upload/u-upload.vue +10 -10
- package/uview-plus/components/u-waterfall/u-waterfall.vue +221 -3
- package/uview-plus/index.js +4 -2
- package/uview-plus/libs/ctocode/index.js +120 -0
- package/uview-plus/libs/function/index-wu.js +1 -34
- package/uview-plus/package.json +3 -3
- package/uview-plus/readme-wu.md +1 -1
- package/uview-plus/libs/function/cc.js +0 -66
|
@@ -1,3 +1,175 @@
|
|
|
1
|
-
<template>
|
|
2
1
|
<view class="u-select">
|
|
3
2
|
<view class="u-select__content">
|
|
4
3
|
<view class="u-select__label" @click="openSelect">
|
|
5
4
|
<slot name="text" :currentLabel="currentLabel">
|
|
6
5
|
<text class="u-select__text" v-if="showOptionsLabel">
|
|
7
6
|
{{ currentLabel }}
|
|
8
7
|
</text>
|
|
9
8
|
<text class="u-select__text" v-else>
|
|
10
9
|
{{ label }}
|
|
11
10
|
</text>
|
|
12
11
|
</slot>
|
|
13
12
|
<slot name="icon">
|
|
14
13
|
<u-icon name="arrow-down" :size="iconSize" :color="iconColor"></u-icon>
|
|
15
14
|
</slot>
|
|
16
15
|
</view>
|
|
17
16
|
<u-overlay
|
|
18
17
|
:show="isOpen"
|
|
19
18
|
@click="overlayClick"
|
|
20
19
|
v-if="overlay"
|
|
21
20
|
:zIndex="zIndex"
|
|
22
21
|
:duration="duration + 50"
|
|
23
22
|
:customStyle="overlayStyle"
|
|
24
23
|
:opacity="overlayOpacity"
|
|
25
24
|
@touchmove.stop.prevent="noop"
|
|
26
25
|
></u-overlay>
|
|
27
26
|
<view
|
|
28
27
|
class="u-select__options__wrap"
|
|
29
28
|
:style="{ overflowY: 'auto', zIndex: zIndex + 1, left: optionsWrapLeft, right: optionsWrapRight, maxHeight: maxHeight }"
|
|
30
29
|
>
|
|
31
30
|
<view class="u-select__options" v-if="isOpen">
|
|
32
31
|
<slot name="options">
|
|
33
32
|
<view
|
|
34
33
|
class="u-select__options_item"
|
|
35
34
|
:class="current == item[keyName] ? 'active' : ''"
|
|
36
35
|
:key="index"
|
|
37
36
|
v-for="(item, index) in options"
|
|
38
37
|
@click="selectItem(item)"
|
|
39
38
|
>
|
|
40
39
|
<slot name="optionItem" :item="item">
|
|
41
40
|
<text class="u-select__item_text" :style="{ color: itemColor }">
|
|
42
41
|
{{ item[labelName] }}
|
|
43
42
|
</text>
|
|
44
43
|
</slot>
|
|
45
44
|
</view>
|
|
46
45
|
</slot>
|
|
47
46
|
</view>
|
|
48
47
|
</view>
|
|
49
48
|
</view>
|
|
50
49
|
</view>
|
|
51
50
|
name: 'up-select',
|
|
52
51
|
emits: ['update:current', 'select'],
|
|
53
52
|
props: {
|
|
54
53
|
maxHeight: {
|
|
55
54
|
type: String,
|
|
56
55
|
default: '90vh'
|
|
57
56
|
},
|
|
58
57
|
overlay: {
|
|
59
58
|
type: Boolean,
|
|
60
59
|
default: true
|
|
61
60
|
},
|
|
62
61
|
overlayOpacity: {
|
|
63
62
|
type: Number,
|
|
64
63
|
default: 0.01
|
|
65
64
|
},
|
|
66
65
|
overlayStyle: {
|
|
67
66
|
type: Object,
|
|
68
67
|
default: () => {
|
|
69
68
|
return {};
|
|
70
69
|
}
|
|
71
70
|
},
|
|
72
71
|
duration: {
|
|
73
72
|
type: Number,
|
|
74
73
|
default: 300
|
|
75
74
|
},
|
|
76
75
|
label: {
|
|
77
76
|
type: String,
|
|
78
77
|
default: '选项'
|
|
79
78
|
},
|
|
80
79
|
options: {
|
|
81
80
|
type: Array,
|
|
82
81
|
default: () => {
|
|
83
82
|
return [];
|
|
84
83
|
}
|
|
85
84
|
},
|
|
86
85
|
keyName: {
|
|
87
86
|
type: String,
|
|
88
87
|
default: 'id'
|
|
89
88
|
},
|
|
90
89
|
labelName: {
|
|
91
90
|
type: String,
|
|
92
91
|
default: 'name'
|
|
93
92
|
},
|
|
94
93
|
showOptionsLabel: {
|
|
95
94
|
type: Boolean,
|
|
96
95
|
default: false
|
|
97
96
|
},
|
|
98
97
|
current: {
|
|
99
98
|
type: [String, Number],
|
|
100
99
|
default: ''
|
|
101
100
|
},
|
|
102
101
|
zIndex: {
|
|
103
102
|
type: Number,
|
|
104
103
|
default: 11000
|
|
105
104
|
},
|
|
106
105
|
itemColor: {
|
|
107
106
|
type: String,
|
|
108
107
|
default: '#333333'
|
|
109
108
|
},
|
|
110
109
|
iconColor: {
|
|
111
110
|
type: String,
|
|
112
111
|
default: ''
|
|
113
112
|
},
|
|
114
113
|
iconSize: {
|
|
115
114
|
type: [String],
|
|
116
115
|
default: '13px'
|
|
117
116
|
}
|
|
118
117
|
},
|
|
119
118
|
data() {
|
|
120
119
|
return {
|
|
121
120
|
isOpen: false,
|
|
122
121
|
optionsWrapLeft: 'auto',
|
|
123
122
|
optionsWrapRight: 'auto'
|
|
124
123
|
};
|
|
125
124
|
},
|
|
126
125
|
computed: {
|
|
127
126
|
currentLabel() {
|
|
128
127
|
let name = '';
|
|
129
128
|
this.options.forEach((ele) => {
|
|
130
129
|
if (ele[this.keyName] === this.current) {
|
|
131
130
|
name = ele[this.labelName];
|
|
132
131
|
}
|
|
133
132
|
});
|
|
134
133
|
return name;
|
|
135
134
|
}
|
|
136
135
|
},
|
|
137
136
|
methods: {
|
|
138
137
|
openSelect() {
|
|
139
138
|
this.isOpen = true;
|
|
140
139
|
this.$nextTick(() => {
|
|
141
140
|
if (this.isOpen) {
|
|
142
141
|
this.adjustOptionsWrapPosition();
|
|
143
142
|
}
|
|
144
143
|
});
|
|
145
144
|
},
|
|
146
145
|
overlayClick() {
|
|
147
146
|
this.isOpen = false;
|
|
148
147
|
},
|
|
149
148
|
selectItem(item) {
|
|
150
149
|
this.isOpen = false;
|
|
151
150
|
this.$emit('update:current', item[this.keyName]);
|
|
152
151
|
this.$emit('select', item);
|
|
153
152
|
},
|
|
154
153
|
adjustOptionsWrapPosition() {
|
|
155
154
|
let wi = getWindowInfo();
|
|
156
155
|
let windowWidth = wi.windowWidth;
|
|
157
156
|
this.$uGetRect('.u-select__options__wrap').then((rect) => {
|
|
158
157
|
console.log(rect);
|
|
159
158
|
if (rect.left + rect.width > windowWidth) {
|
|
160
159
|
// 如果右侧被遮挡,则调整到左侧
|
|
161
160
|
this.optionsWrapLeft = 'auto';
|
|
162
161
|
this.optionsWrapRight = `0px`;
|
|
163
162
|
}
|
|
164
163
|
});
|
|
165
164
|
}
|
|
166
165
|
}
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
<template>
|
|
167
|
+
<view class="u-select">
|
|
168
|
+
<view class="u-select__content">
|
|
169
|
+
<view class="u-select__label" @click="openSelect">
|
|
170
|
+
<slot name="text" :currentLabel="currentLabel">
|
|
171
|
+
<text class="u-select__text" v-if="showOptionsLabel">
|
|
172
|
+
{{ currentLabel }}
|
|
173
|
+
</text>
|
|
174
|
+
<text class="u-select__text" v-else>
|
|
175
|
+
{{ label }}
|
|
176
|
+
</text>
|
|
177
|
+
</slot>
|
|
178
|
+
<slot name="icon">
|
|
179
|
+
<up-icon name="arrow-down" :size="iconSize" :color="iconColor"></up-icon>
|
|
180
|
+
</slot>
|
|
181
|
+
</view>
|
|
182
|
+
<up-overlay
|
|
183
|
+
:show="isOpen"
|
|
184
|
+
@click="overlayClick"
|
|
185
|
+
v-if="overlay"
|
|
186
|
+
:zIndex="zIndex"
|
|
187
|
+
:duration="duration + 50"
|
|
188
|
+
:customStyle="overlayStyle"
|
|
189
|
+
:opacity="overlayOpacity"
|
|
190
|
+
@touchmove.stop.prevent="noop"
|
|
191
|
+
></up-overlay>
|
|
192
|
+
<view
|
|
193
|
+
class="u-select__options__wrap"
|
|
194
|
+
:style="{ overflowY: 'auto', zIndex: zIndex + 1, left: optionsWrapLeft, right: optionsWrapRight, maxHeight: maxHeight }"
|
|
195
|
+
>
|
|
196
|
+
<view class="u-select__options" v-if="isOpen">
|
|
197
|
+
<slot name="options">
|
|
198
|
+
<view
|
|
199
|
+
class="u-select__options_item"
|
|
200
|
+
:class="current == item[keyName] ? 'active' : ''"
|
|
201
|
+
:key="index"
|
|
202
|
+
v-for="(item, index) in options"
|
|
203
|
+
@click="selectItem(item)"
|
|
204
|
+
>
|
|
205
|
+
<slot name="optionItem" :item="item">
|
|
206
|
+
<text class="u-select__item_text" :style="{ color: itemColor }">
|
|
207
|
+
{{ item[labelName] }}
|
|
208
|
+
</text>
|
|
209
|
+
</slot>
|
|
210
|
+
</view>
|
|
211
|
+
</slot>
|
|
212
|
+
</view>
|
|
213
|
+
</view>
|
|
214
|
+
</view>
|
|
215
|
+
</view>
|
|
216
|
+
</template>
|
|
217
|
+
<script>
|
|
218
|
+
import { getWindowInfo } from '../../libs/function/index';
|
|
219
|
+
export default {
|
|
220
|
+
name: 'up-select',
|
|
221
|
+
emits: ['update:current', 'select'],
|
|
222
|
+
props: {
|
|
223
|
+
maxHeight: {
|
|
224
|
+
type: String,
|
|
225
|
+
default: '90vh'
|
|
226
|
+
},
|
|
227
|
+
overlay: {
|
|
228
|
+
type: Boolean,
|
|
229
|
+
default: true
|
|
230
|
+
},
|
|
231
|
+
overlayOpacity: {
|
|
232
|
+
type: Number,
|
|
233
|
+
default: 0.01
|
|
234
|
+
},
|
|
235
|
+
overlayStyle: {
|
|
236
|
+
type: Object,
|
|
237
|
+
default: () => {
|
|
238
|
+
return {};
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
duration: {
|
|
242
|
+
type: Number,
|
|
243
|
+
default: 300
|
|
244
|
+
},
|
|
245
|
+
label: {
|
|
246
|
+
type: String,
|
|
247
|
+
default: '选项'
|
|
248
|
+
},
|
|
249
|
+
options: {
|
|
250
|
+
type: Array,
|
|
251
|
+
default: () => {
|
|
252
|
+
return [];
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
keyName: {
|
|
256
|
+
type: String,
|
|
257
|
+
default: 'id'
|
|
258
|
+
},
|
|
259
|
+
labelName: {
|
|
260
|
+
type: String,
|
|
261
|
+
default: 'name'
|
|
262
|
+
},
|
|
263
|
+
showOptionsLabel: {
|
|
264
|
+
type: Boolean,
|
|
265
|
+
default: false
|
|
266
|
+
},
|
|
267
|
+
current: {
|
|
268
|
+
type: [String, Number],
|
|
269
|
+
default: ''
|
|
270
|
+
},
|
|
271
|
+
zIndex: {
|
|
272
|
+
type: Number,
|
|
273
|
+
default: 11000
|
|
274
|
+
},
|
|
275
|
+
itemColor: {
|
|
276
|
+
type: String,
|
|
277
|
+
default: '#333333'
|
|
278
|
+
},
|
|
279
|
+
iconColor: {
|
|
280
|
+
type: String,
|
|
281
|
+
default: ''
|
|
282
|
+
},
|
|
283
|
+
iconSize: {
|
|
284
|
+
type: [String],
|
|
285
|
+
default: '13px'
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
data() {
|
|
289
|
+
return {
|
|
290
|
+
isOpen: false,
|
|
291
|
+
optionsWrapLeft: 'auto',
|
|
292
|
+
optionsWrapRight: 'auto'
|
|
293
|
+
};
|
|
294
|
+
},
|
|
295
|
+
computed: {
|
|
296
|
+
currentLabel() {
|
|
297
|
+
let name = '';
|
|
298
|
+
this.options.forEach((ele) => {
|
|
299
|
+
if (ele[this.keyName] === this.current) {
|
|
300
|
+
name = ele[this.labelName];
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
return name;
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
methods: {
|
|
307
|
+
openSelect() {
|
|
308
|
+
this.isOpen = true;
|
|
309
|
+
this.$nextTick(() => {
|
|
310
|
+
if (this.isOpen) {
|
|
311
|
+
this.adjustOptionsWrapPosition();
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
},
|
|
315
|
+
overlayClick() {
|
|
316
|
+
this.isOpen = false;
|
|
317
|
+
},
|
|
318
|
+
selectItem(item) {
|
|
319
|
+
this.isOpen = false;
|
|
320
|
+
this.$emit('update:current', item[this.keyName]);
|
|
321
|
+
this.$emit('select', item);
|
|
322
|
+
},
|
|
323
|
+
adjustOptionsWrapPosition() {
|
|
324
|
+
let wi = getWindowInfo();
|
|
325
|
+
let windowWidth = wi.windowWidth;
|
|
326
|
+
this.$uGetRect('.u-select__options__wrap').then((rect) => {
|
|
327
|
+
console.log(rect);
|
|
328
|
+
if (rect.left + rect.width > windowWidth) {
|
|
329
|
+
// 如果右侧被遮挡,则调整到左侧
|
|
330
|
+
this.optionsWrapLeft = 'auto';
|
|
331
|
+
this.optionsWrapRight = `0px`;
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
</script>
|
|
338
|
+
<style scoped>
|
|
339
|
+
@import './style.css';
|
|
340
|
+
</style>
|
|
@@ -62,7 +62,7 @@ const animation = uni.requireNativePlugin('animation');
|
|
|
62
62
|
* @property {Boolean} avatar 是否展示头像占位图 (默认 false )
|
|
63
63
|
* @property {String | Number} avatarSize 头像占位图大小 (默认 32 )
|
|
64
64
|
* @property {String} avatarShape 头像占位图的形状,circle-圆形,square-方形 (默认 'circle' )
|
|
65
|
-
* @example <
|
|
65
|
+
* @example <up-search placeholder="日照香炉生紫烟" v-model="keyword"></up-search>
|
|
66
66
|
*/
|
|
67
67
|
export default {
|
|
68
68
|
name: 'u-skeleton',
|
|
@@ -89,8 +89,8 @@ export default {
|
|
|
89
89
|
rowWidth = test.array(this.rowsWidth)
|
|
90
90
|
? this.rowsWidth[i] || (i === this.rows - 1 ? '70%' : '100%')
|
|
91
91
|
: i === this.rows - 1
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
? '70%'
|
|
93
|
+
: this.rowsWidth,
|
|
94
94
|
rowHeight = test.array(this.rowsHeight) ? this.rowsHeight[i] || '18px' : this.rowsHeight;
|
|
95
95
|
// 如果有title占位图,第一个段落占位图的外边距需要大一些,如果没有title占位图,第一个段落占位图则无需外边距
|
|
96
96
|
// 之所以需要这么做,是因为weex的无能,以提升性能为借口不支持css的一些伪类
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
</view>
|
|
27
27
|
<view class="number">
|
|
28
28
|
<text class="key">数量</text>
|
|
29
|
-
<
|
|
29
|
+
<up-number-box
|
|
30
30
|
width="200px"
|
|
31
31
|
integer
|
|
32
32
|
v-model="num"
|
|
33
33
|
:min="selectSku.stock == 0 ? 0 : 1"
|
|
34
34
|
:max="selectSku.id ? selectSku.stock : showAreaStock[1]"
|
|
35
|
-
></
|
|
35
|
+
></up-number-box>
|
|
36
36
|
</view>
|
|
37
37
|
<scroll-view :style="[specsListMaxHeight]" scroll-y="true" class="specsList">
|
|
38
38
|
<view class="item" v-for="(skuArr, skuArrKey) in r.result" :key="skuArrKey">
|
|
@@ -141,14 +141,14 @@ import { props } from './props.js';
|
|
|
141
141
|
* @event {Function} close 关闭sku组件触发事件。
|
|
142
142
|
* @event {Function} open 打开sku组件触发事件。
|
|
143
143
|
* @event {Function} numChange 输入框内数量发生改变时触发事件。
|
|
144
|
-
* @example <
|
|
144
|
+
* @example <up-sku-wu
|
|
145
145
|
v-model="skuShow"
|
|
146
146
|
:data="skus"
|
|
147
147
|
:defaultCover="logo"
|
|
148
148
|
@skuChange="skuChange"
|
|
149
149
|
@confirm="buyShop"
|
|
150
150
|
>
|
|
151
|
-
</
|
|
151
|
+
</up-sku-wu>
|
|
152
152
|
*/
|
|
153
153
|
export default {
|
|
154
154
|
name: 'u-sku-wu',
|
|
@@ -14,7 +14,7 @@ import { addUnit, addStyle, deepMerge, getWindowInfo } from '../../libs/function
|
|
|
14
14
|
* @tutorial https://uview-plus.jiangruyi.com/components/statusBar.html
|
|
15
15
|
* @property {String} bgColor 背景色 (默认 'transparent' )
|
|
16
16
|
* @property {String | Object} customStyle 自定义样式
|
|
17
|
-
* @example <
|
|
17
|
+
* @example <up-status-bar></up-status-bar>
|
|
18
18
|
*/
|
|
19
19
|
export default {
|
|
20
20
|
name: 'u-status-bar',
|
|
@@ -19,7 +19,7 @@ import test from '../../libs/function/test';
|
|
|
19
19
|
* @property {String} activeIcon 激活状态的图标
|
|
20
20
|
* @property {String} inactiveIcon 未激活状态图标
|
|
21
21
|
* @property {Boolean} dot 是否显示点类型 (默认 false )
|
|
22
|
-
* @example <
|
|
22
|
+
* @example <up-steps current="0"><up-steps-item title="已出库" desc="10:35" ></up-steps-item></up-steps>
|
|
23
23
|
*/
|
|
24
24
|
export default {
|
|
25
25
|
name: 'u-steps',
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
}"
|
|
24
24
|
></view>
|
|
25
25
|
<view class="u-steps-item__wrapper__icon" v-else-if="parentData.activeIcon || parentData.inactiveIcon">
|
|
26
|
-
<
|
|
26
|
+
<up-icon
|
|
27
27
|
:name="index <= parentData.current ? parentData.activeIcon : parentData.inactiveIcon"
|
|
28
28
|
:size="iconSize"
|
|
29
29
|
:color="index <= parentData.current ? parentData.activeColor : parentData.inactiveColor"
|
|
30
|
-
></
|
|
30
|
+
></up-icon>
|
|
31
31
|
</view>
|
|
32
32
|
<view
|
|
33
33
|
v-else
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
>
|
|
47
47
|
{{ index + 1 }}
|
|
48
48
|
</text>
|
|
49
|
-
<
|
|
49
|
+
<up-icon
|
|
50
50
|
v-else
|
|
51
51
|
:color="statusClass === 'error' ? 'error' : parentData.activeColor"
|
|
52
52
|
size="12"
|
|
53
53
|
:name="statusClass === 'error' ? 'close' : 'checkmark'"
|
|
54
|
-
></
|
|
54
|
+
></up-icon>
|
|
55
55
|
</view>
|
|
56
56
|
</slot>
|
|
57
57
|
</view>
|
|
@@ -106,7 +106,7 @@ const dom = uni.requireNativePlugin('dom');
|
|
|
106
106
|
* @property {String} current 描述文本
|
|
107
107
|
* @property {String | Number} iconSize 图标大小 (默认 17 )
|
|
108
108
|
* @property {Boolean} error 当前步骤是否处于失败状态 (默认 false )
|
|
109
|
-
* @example <
|
|
109
|
+
* @example <up-steps current="0"><up-steps-item title="已出库" desc="10:35" ></up-steps-item></up-steps>
|
|
110
110
|
*/
|
|
111
111
|
export default {
|
|
112
112
|
name: 'u-steps-item',
|
|
@@ -155,8 +155,8 @@ export default {
|
|
|
155
155
|
style.backgroundColor = this.parent.children?.[this.index + 1]?.error
|
|
156
156
|
? color.error
|
|
157
157
|
: this.index < this.parentData.current
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
? this.parentData.activeColor
|
|
159
|
+
: this.parentData.inactiveColor;
|
|
160
160
|
return style;
|
|
161
161
|
},
|
|
162
162
|
itemStyleInner() {
|
|
@@ -24,7 +24,7 @@ import zIndex from '../../libs/config/zIndex';
|
|
|
24
24
|
* @property {Object} customStyle 组件的样式,对象形式
|
|
25
25
|
* @event {Function} fixed 组件吸顶时触发
|
|
26
26
|
* @event {Function} unfixed 组件取消吸顶时触发
|
|
27
|
-
* @example <
|
|
27
|
+
* @example <up-sticky offsetTop="200"><view>塞下秋来风景异,衡阳雁去无留意</view></up-sticky>
|
|
28
28
|
*/
|
|
29
29
|
export default {
|
|
30
30
|
name: 'u-sticky',
|
|
@@ -54,7 +54,7 @@ import { addStyle, addUnit, sleep } from '../../libs/function/index';
|
|
|
54
54
|
* @property {String} keyName 从`list`元素对象中读取的键名(默认 'name' )
|
|
55
55
|
*
|
|
56
56
|
* @event {Function} change 分段器选项发生改变时触发 回调 index:选项的index索引值,从0开始
|
|
57
|
-
* @example <
|
|
57
|
+
* @example <up-subsection :list="list" :current="curNow" @change="sectionChange"></up-subsection>
|
|
58
58
|
*/
|
|
59
59
|
export default {
|
|
60
60
|
name: 'u-subsection',
|
|
@@ -13,7 +13,7 @@ import { mixin } from '../../libs/mixin/mixin';
|
|
|
13
13
|
* @tutorial https://ijry.github.io/uview-plus/components/swipeAction.html
|
|
14
14
|
* @property {Boolean} autoClose 是否自动关闭其他swipe按钮组
|
|
15
15
|
* @event {Function(index)} click 点击组件时触发
|
|
16
|
-
* @example <
|
|
16
|
+
* @example <up-swipe-action><up-swipe-action-item :rightOptions="options1" ></up-swipe-action-item></up-swipe-action>
|
|
17
17
|
*/
|
|
18
18
|
export default {
|
|
19
19
|
name: 'u-swipe-action',
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
item.style
|
|
29
29
|
]"
|
|
30
30
|
>
|
|
31
|
-
<
|
|
31
|
+
<up-icon
|
|
32
32
|
v-if="item.icon"
|
|
33
33
|
:name="item.icon"
|
|
34
34
|
:color="item.style && item.style.color ? item.style.color : '#ffffff'"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
:customStyle="{
|
|
39
39
|
marginRight: item.text ? '2px' : 0
|
|
40
40
|
}"
|
|
41
|
-
></
|
|
41
|
+
></up-icon>
|
|
42
42
|
<text
|
|
43
43
|
v-if="item.text"
|
|
44
44
|
class="u-swipe-action-item__right__button__wrapper__text u-line-1"
|
|
@@ -124,7 +124,7 @@ import other from './other.js';
|
|
|
124
124
|
* @property {String | Number} duration 动画过渡时间,单位ms(默认 350 )
|
|
125
125
|
* @event {Function(index)} open 组件打开时触发
|
|
126
126
|
* @event {Function(index)} close 组件关闭时触发
|
|
127
|
-
* @example <
|
|
127
|
+
* @example <up-swipe-action><up-swipe-action-item :options="options1" ></up-swipe-action-item></up-swipe-action>
|
|
128
128
|
*/
|
|
129
129
|
export default {
|
|
130
130
|
name: 'u-swipe-action-item',
|
|
@@ -119,7 +119,7 @@ import test from '../../libs/function/test';
|
|
|
119
119
|
* @property {Boolean} showTitle 是否显示标题,要求数组对象中有title属性(默认 false )
|
|
120
120
|
* @event {Function(index)} click 点击轮播图时触发 index:点击了第几张图片,从0开始
|
|
121
121
|
* @event {Function(index)} change 轮播图切换时触发(自动或者手动切换) index:切换到了第几张图片,从0开始
|
|
122
|
-
* @example <
|
|
122
|
+
* @example <up-swiper :list="list4" keyName="url" :autoplay="false"></up-swiper>
|
|
123
123
|
*/
|
|
124
124
|
export default {
|
|
125
125
|
name: 'u-swiper',
|
|
@@ -36,7 +36,7 @@ import { addUnit } from '../../libs/function/index';
|
|
|
36
36
|
* @property {String} indicatorActiveColor 指示器非激活颜色
|
|
37
37
|
* @property {String} indicatorInactiveColor 指示器的激活颜色
|
|
38
38
|
* @property {String} indicatorMode 指示器模式(默认 'line' )
|
|
39
|
-
* @example <
|
|
39
|
+
* @example <up-swiper :list="list4" indicator keyName="url" :autoplay="false"></up-swiper>
|
|
40
40
|
*/
|
|
41
41
|
export default {
|
|
42
42
|
name: 'u-swiper-indicator',
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
:style="[nodeStyle]"
|
|
22
22
|
ref="u-switch__node"
|
|
23
23
|
>
|
|
24
|
-
<
|
|
24
|
+
<up-loading-icon
|
|
25
25
|
:show="loading"
|
|
26
26
|
mode="circle"
|
|
27
27
|
timingFunction='linear'
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
59
59
|
*
|
|
60
60
|
* @event {Function} change 在switch打开或关闭时触发
|
|
61
|
-
* @example <
|
|
61
|
+
* @example <up-switch v-model="checked" active-color="red" inactive-color="#eee"></up-switch>
|
|
62
62
|
*/
|
|
63
63
|
export default {
|
|
64
64
|
name: "u-switch",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<view class="u-tabbar__content__item-wrapper">
|
|
11
11
|
<slot />
|
|
12
12
|
</view>
|
|
13
|
-
<
|
|
13
|
+
<up-safe-bottom v-if="safeAreaInsetBottom"></up-safe-bottom>
|
|
14
14
|
</view>
|
|
15
15
|
<view
|
|
16
16
|
class="u-tabbar__placeholder"
|
|
@@ -43,7 +43,7 @@ const dom = uni.requireNativePlugin('dom');
|
|
|
43
43
|
* @property {Boolean} placeholder fixed定位固定在底部时,是否生成一个等高元素防止塌陷(默认 true )
|
|
44
44
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
45
45
|
*
|
|
46
|
-
* @example <
|
|
46
|
+
* @example <up-tabbar :value="value2" :placeholder="false" @change="name => value2 = name" :fixed="false" :safeAreaInsetBottom="false"><up-tabbar-item text="首页" icon="home" dot ></up-tabbar-item></up-tabbar>
|
|
47
47
|
*/
|
|
48
48
|
export default {
|
|
49
49
|
name: 'u-tabbar',
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="u-tabbar-item" :style="[addStyle(customStyle)]" @tap="clickHandler">
|
|
3
3
|
<view class="u-tabbar-item__icon">
|
|
4
|
-
<
|
|
4
|
+
<up-icon
|
|
5
|
+
v-if="icon"
|
|
6
|
+
:name="icon"
|
|
7
|
+
:color="isActive ? parentData.activeColor : parentData.inactiveColor"
|
|
8
|
+
:size="20"
|
|
9
|
+
></up-icon>
|
|
5
10
|
<template v-else>
|
|
6
11
|
<slot v-if="isActive" name="active-icon" />
|
|
7
12
|
<slot v-else name="inactive-icon" />
|
|
8
13
|
</template>
|
|
9
|
-
<
|
|
14
|
+
<up-badge
|
|
10
15
|
absolute
|
|
11
16
|
:offset="[0, dot ? '34rpx' : badge > 9 ? '14rpx' : '20rpx']"
|
|
12
17
|
:customStyle="badgeStyle"
|
|
13
18
|
:isDot="dot"
|
|
14
19
|
:value="badge || (dot ? 1 : null)"
|
|
15
20
|
:show="dot || badge > 0"
|
|
16
|
-
></
|
|
21
|
+
></up-badge>
|
|
17
22
|
</view>
|
|
18
23
|
<slot name="text">
|
|
19
24
|
<text
|
|
@@ -44,7 +49,7 @@ import { addStyle, error } from '../../libs/function/index';
|
|
|
44
49
|
* @property {Object | String} badgeStyle 控制徽标的位置,对象或者字符串形式,可以设置top和right属性(默认 'top: 6px;right:2px;' )
|
|
45
50
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
46
51
|
*
|
|
47
|
-
* @example <
|
|
52
|
+
* @example <up-tabbar :value="value2" :placeholder="false" @change="name => value2 = name" :fixed="false" :safeAreaInsetBottom="false"><up-tabbar-item text="首页" icon="home" dot ></up-tabbar-item></up-tabbar>
|
|
48
53
|
*/
|
|
49
54
|
export default {
|
|
50
55
|
name: 'u-tabbar-item',
|
|
@@ -9,7 +9,7 @@ import { mixin } from '../../libs/mixin/mixin';
|
|
|
9
9
|
* Table 表格
|
|
10
10
|
* @description 表格组件一般用于展示大量结构化数据的场景 本组件标签类似HTML的table表格,由table、tr、th、td四个组件组成
|
|
11
11
|
* @tutorial https://ijry.github.io/uview-plus/components/table.html
|
|
12
|
-
* @example <
|
|
12
|
+
* @example <up-table><up-tr><up-th>学校</up-th </up-tr> <up-tr><up-td>浙江大学</up-td> </up-tr> <up-tr><up-td>清华大学</up-td> </up-tr></up-table>
|
|
13
13
|
*/
|
|
14
14
|
export default {
|
|
15
15
|
name: 'u-table',
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
>
|
|
48
48
|
{{ item[keyName] }}
|
|
49
49
|
</text>
|
|
50
|
-
<
|
|
50
|
+
<up-badge
|
|
51
51
|
:show="!!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value))"
|
|
52
52
|
:isDot="(item.badge && item.badge.isDot) || propsBadge.isDot"
|
|
53
53
|
:value="(item.badge && item.badge.value) || propsBadge.value"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
:numberType="(item.badge && item.badge.numberType) || propsBadge.numberType"
|
|
61
61
|
:inverted="(item.badge && item.badge.inverted) || propsBadge.inverted"
|
|
62
62
|
customStyle="margin-left: 4px;"
|
|
63
|
-
></
|
|
63
|
+
></up-badge>
|
|
64
64
|
</view>
|
|
65
65
|
<!-- #ifdef APP-NVUE -->
|
|
66
66
|
<view
|
|
@@ -119,7 +119,7 @@ import { addUnit, addStyle, deepMerge, getPx, sleep, getWindowInfo } from '../..
|
|
|
119
119
|
* @event {Function(index)} change 标签改变时触发 index: 点击了第几个tab,索引从0开始
|
|
120
120
|
* @event {Function(index)} click 点击标签时触发 index: 点击了第几个tab,索引从0开始
|
|
121
121
|
* @event {Function(index)} longPress 长按标签时触发 index: 点击了第几个tab,索引从0开始
|
|
122
|
-
* @example <
|
|
122
|
+
* @example <up-tabs :list="list" :is-scroll="false" :current="current" @change="change" @longPress="longPress"></up-tabs>
|
|
123
123
|
*/
|
|
124
124
|
export default {
|
|
125
125
|
name: 'u-tabs',
|