@cloudbase/weda-ui-mp 3.17.3 → 3.17.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.
- package/components/form/select/dropdown-select/index.wxml +4 -4
- package/components/form/select/dropdown-select/index.wxss +9 -9
- package/components/form/selectMultiple/dropdown-select/index.wxml +4 -4
- package/components/form/selectMultiple/dropdown-select/index.wxss +9 -9
- package/components/form/uploaderFile/index.js +13 -10
- package/components/form/uploaderFile/upload.js +1 -2
- package/components/wd-select/select/dropdown-select/index.wxml +4 -4
- package/components/wd-select/select/dropdown-select/index.wxss +13 -13
- package/components/wd-upload-image/index.js +9 -2
- package/package.json +1 -1
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
<text class="weda-ui-custom-search__btn-cancle" bindtap="shrink">取消</text>
|
|
17
17
|
</view>
|
|
18
18
|
<scroll-view wx:if="{{status !== -1}}" class="weda-ui-custom-picker__body" scroll-y="true" enhanced="true" bindscrolltolower="bindscrolltolower">
|
|
19
|
-
<view class="weda-ui-custom-
|
|
20
|
-
<view class="weda-ui-custom-
|
|
21
|
-
<view wx:for="{{showOption}}" wx:key="i" wx:for-index="i" class="weda-ui-custom-
|
|
22
|
-
<text class="weda-ui-custom-
|
|
19
|
+
<view class="weda-ui-custom-picker__columns">
|
|
20
|
+
<view class="weda-ui-custom-picker__column">
|
|
21
|
+
<view wx:for="{{showOption}}" wx:key="i" wx:for-index="i" class="weda-ui-custom-picker__column-item {{ i === index ? 'is-selected':''}} {{ (i === disabledIndex || item.disabled) ? 'is-disabled':''}}" bindtap="onItemClick" data-value="{{item}}">
|
|
22
|
+
<text class="weda-ui-custom-picker__column-item-text">{{item.label}}</text>
|
|
23
23
|
</view>
|
|
24
24
|
<view wx:if="{{status === 1}}" class="weda-ui-custom-picker__status weda-ui-custom-picker__status--loading"> <i class="weda-ui-custom-picker__loading-icon"></i>加载中... </view>
|
|
25
25
|
<view wx:if="{{status === 2}}" class="weda-ui-custom-picker__status">
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
border: none;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.weda-ui-custom-
|
|
68
|
+
.weda-ui-custom-picker__columns {
|
|
69
69
|
display: flex;
|
|
70
70
|
align-items: flex-start;
|
|
71
71
|
position: relative;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.weda-ui-custom-
|
|
77
|
+
.weda-ui-custom-picker__column {
|
|
78
78
|
flex: 1 1 0;
|
|
79
79
|
overflow-y: auto;
|
|
80
80
|
overflow-x: hidden;
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
/* height: 199px; */
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.weda-ui-custom-
|
|
85
|
+
.weda-ui-custom-picker__column::-webkit-scrollbar {
|
|
86
86
|
display: none;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.weda-ui-custom-
|
|
89
|
+
.weda-ui-custom-picker__column-item {
|
|
90
90
|
display: flex;
|
|
91
91
|
align-items: center;
|
|
92
92
|
white-space: pre-wrap;
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
position: relative;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.weda-ui-custom-
|
|
99
|
+
.weda-ui-custom-picker__column-item::before {
|
|
100
100
|
content: '';
|
|
101
101
|
position: absolute;
|
|
102
102
|
bottom: 0;
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/* theme */
|
|
110
|
-
.weda-ui-custom-
|
|
110
|
+
.weda-ui-custom-picker__column-item.is-selected {
|
|
111
111
|
color: var(--wd-color-brand, #0052d9);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.weda-ui-custom-
|
|
114
|
+
.weda-ui-custom-picker__column-item.is-selected::after {
|
|
115
115
|
content: '';
|
|
116
116
|
display: block;
|
|
117
117
|
width: 8px;
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
right: 10px;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
.weda-ui-custom-
|
|
127
|
+
.weda-ui-custom-picker__column-item.is-disabled {
|
|
128
128
|
color: rgba(0, 0, 0, 0.26);
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
display: none;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
.weda-ui-custom-
|
|
287
|
+
.weda-ui-custom-picker__column-item-text {
|
|
288
288
|
overflow: hidden;
|
|
289
289
|
text-overflow: ellipsis;
|
|
290
290
|
white-space: nowrap;
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
<text class="weda-ui-custom-search__btn-cancle" bindtap="shrink">取消</text>
|
|
19
19
|
</view>
|
|
20
20
|
<scroll-view wx:if="{{status !== -1}}" class="weda-ui-custom-picker__body" scroll-y="true" enhanced="true" bindscrolltolower="bindscrolltolower">
|
|
21
|
-
<view class="weda-ui-custom-
|
|
22
|
-
<view class="weda-ui-custom-
|
|
23
|
-
<view wx:for="{{showOption}}" wx:key="i" wx:for-index="i" class="weda-ui-custom-
|
|
24
|
-
<text class="weda-ui-custom-
|
|
21
|
+
<view class="weda-ui-custom-picker__columns">
|
|
22
|
+
<view class="weda-ui-custom-picker__column">
|
|
23
|
+
<view wx:for="{{showOption}}" wx:key="i" wx:for-index="i" class="weda-ui-custom-picker__column-item multiple {{ tools.includes(selectedCache, item) ? 'is-selected':''}} {{ (i === disabledIndex || item.disabled) ? 'is-disabled':''}}" bindtap="onItemClick" data-value="{{item}}">
|
|
24
|
+
<text class="weda-ui-custom-picker__column-item-text multiple">{{item.label}}</text>
|
|
25
25
|
</view>
|
|
26
26
|
<view wx:if="{{status === 1}}" class="weda-ui-custom-picker__status weda-ui-custom-picker__status--loading"> <i class="weda-ui-custom-picker__loading-icon"></i>加载中... </view>
|
|
27
27
|
<view wx:if="{{status === 2}}" class="weda-ui-custom-picker__status">
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
border: none;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.weda-ui-custom-
|
|
68
|
+
.weda-ui-custom-picker__columns {
|
|
69
69
|
display: flex;
|
|
70
70
|
align-items: flex-start;
|
|
71
71
|
position: relative;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.weda-ui-custom-
|
|
77
|
+
.weda-ui-custom-picker__column {
|
|
78
78
|
flex: 1 1 0;
|
|
79
79
|
overflow-y: auto;
|
|
80
80
|
overflow-x: hidden;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
/* height: 199px; */
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.weda-ui-custom-
|
|
85
|
+
.weda-ui-custom-picker__column-item {
|
|
86
86
|
display: flex;
|
|
87
87
|
align-items: center;
|
|
88
88
|
white-space: pre-wrap;
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
position: relative;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.weda-ui-custom-
|
|
95
|
+
.weda-ui-custom-picker__column-item::before {
|
|
96
96
|
content: '';
|
|
97
97
|
position: absolute;
|
|
98
98
|
bottom: 0;
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
transform: scaleY(0.5);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
.weda-ui-custom-
|
|
105
|
+
.weda-ui-custom-picker__column-item.multiple.is-selected {
|
|
106
106
|
color: rgba(0, 0, 0, 0.9);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
/* theme */
|
|
110
|
-
.weda-ui-custom-
|
|
110
|
+
.weda-ui-custom-picker__column-item.multiple.is-selected::after {
|
|
111
111
|
content: '';
|
|
112
112
|
width: 21px;
|
|
113
113
|
height: 21px;
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
background-position: center;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.weda-ui-custom-
|
|
125
|
+
.weda-ui-custom-picker__column-item.multiple::after {
|
|
126
126
|
content: '';
|
|
127
127
|
width: 20px;
|
|
128
128
|
height: 20px;
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
left: 0px;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.weda-ui-custom-
|
|
136
|
+
.weda-ui-custom-picker__column-item.is-disabled {
|
|
137
137
|
color: rgba(0, 0, 0, 0.26);
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
display: none;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
.weda-ui-custom-
|
|
296
|
+
.weda-ui-custom-picker__column-item-text.multiple {
|
|
297
297
|
overflow: hidden;
|
|
298
298
|
text-overflow: ellipsis;
|
|
299
299
|
white-space: nowrap;
|
|
@@ -208,6 +208,8 @@ Component({
|
|
|
208
208
|
config.action = 'CHOOSE_MESSAGE_FILE';
|
|
209
209
|
break;
|
|
210
210
|
default:
|
|
211
|
+
config.type = 'all';
|
|
212
|
+
config.action = 'CHOOSE_MESSAGE_FILE';
|
|
211
213
|
break;
|
|
212
214
|
}
|
|
213
215
|
const uploadInstance = initUploadInstance({ config, previewFile: files }, this);
|
|
@@ -231,18 +233,19 @@ Component({
|
|
|
231
233
|
if (value && JSON.stringify(value) != '[]') {
|
|
232
234
|
const values = Array.isArray(value) ? value : [value];
|
|
233
235
|
for (let f of values) {
|
|
236
|
+
let hf = f;
|
|
234
237
|
if (f.startsWith('cloud:')) {
|
|
235
|
-
|
|
236
|
-
const label = getName(hf);
|
|
237
|
-
const httpFile = {
|
|
238
|
-
name: label,
|
|
239
|
-
cloudPath: f,
|
|
240
|
-
filePath: hf,
|
|
241
|
-
path: hf,
|
|
242
|
-
status: 'success',
|
|
243
|
-
};
|
|
244
|
-
httpFiles.push(httpFile);
|
|
238
|
+
hf = await getTempFileURL(f);
|
|
245
239
|
}
|
|
240
|
+
const label = getName(hf);
|
|
241
|
+
const httpFile = {
|
|
242
|
+
name: label,
|
|
243
|
+
cloudPath: f,
|
|
244
|
+
filePath: hf,
|
|
245
|
+
path: hf,
|
|
246
|
+
status: 'success',
|
|
247
|
+
};
|
|
248
|
+
httpFiles.push(httpFile);
|
|
246
249
|
}
|
|
247
250
|
this.setData({
|
|
248
251
|
oldValue: value,
|
|
@@ -10,8 +10,7 @@ const chooseFile = ({ action = 'CHOOSE_MEDIA', config, success, fail }) => {
|
|
|
10
10
|
switch (action) {
|
|
11
11
|
case ACTION['CHOOSE_MEDIA']:
|
|
12
12
|
_config = {
|
|
13
|
-
|
|
14
|
-
sourceType: ['album'],
|
|
13
|
+
sourceType: ['album', 'camera'],
|
|
15
14
|
...config,
|
|
16
15
|
};
|
|
17
16
|
break;
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
<text class="weda-ui-custom-search__btn-cancle" bindtap="shrink">取消</text>
|
|
19
19
|
</view>
|
|
20
20
|
<scroll-view wx:if="{{status !== -1}}" class="weda-ui-custom-picker__body" scroll-y="true" enhanced="true" bindscrolltolower="bindscrolltolower">
|
|
21
|
-
<view class="weda-ui-custom-
|
|
22
|
-
<view class="weda-ui-custom-
|
|
23
|
-
<view wx:for="{{showOption}}" wx:key="i" wx:for-index="i" class="weda-ui-custom-
|
|
24
|
-
<text class="weda-ui-custom-
|
|
21
|
+
<view class="weda-ui-custom-picker__columns">
|
|
22
|
+
<view class="weda-ui-custom-picker__column">
|
|
23
|
+
<view wx:for="{{showOption}}" wx:key="i" wx:for-index="i" class="weda-ui-custom-picker__column-item {{multiple?'multiple':''}} {{ tools.includes(selectedCache, item) ? 'is-selected':''}} {{ (item.disabled) ? 'is-disabled':''}}" bindtap="onItemClick" data-value="{{item}}">
|
|
24
|
+
<text class="weda-ui-custom-picker__column-item-text {{multiple?'multiple':''}}">{{item.label}}</text>
|
|
25
25
|
</view>
|
|
26
26
|
<view wx:if="{{status === 1}}" class="weda-ui-custom-picker__status weda-ui-custom-picker__status--loading"> <i class="weda-ui-custom-picker__loading-icon"></i>加载中... </view>
|
|
27
27
|
<view wx:if="{{status === 2}}" class="weda-ui-custom-picker__status">
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
border: none;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.weda-ui-custom-
|
|
68
|
+
.weda-ui-custom-picker__columns {
|
|
69
69
|
display: flex;
|
|
70
70
|
align-items: flex-start;
|
|
71
71
|
position: relative;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.weda-ui-custom-
|
|
77
|
+
.weda-ui-custom-picker__column {
|
|
78
78
|
flex: 1 1 0;
|
|
79
79
|
overflow-y: auto;
|
|
80
80
|
overflow-x: hidden;
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
/* height: 199px; */
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.weda-ui-custom-
|
|
85
|
+
.weda-ui-custom-picker__column::-webkit-scrollbar {
|
|
86
86
|
display: none;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.weda-ui-custom-
|
|
89
|
+
.weda-ui-custom-picker__column-item {
|
|
90
90
|
display: flex;
|
|
91
91
|
align-items: center;
|
|
92
92
|
white-space: pre-wrap;
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
position: relative;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.weda-ui-custom-
|
|
99
|
+
.weda-ui-custom-picker__column-item::before {
|
|
100
100
|
content: '';
|
|
101
101
|
position: absolute;
|
|
102
102
|
bottom: 0;
|
|
@@ -106,11 +106,11 @@
|
|
|
106
106
|
transform: scaleY(0.5);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.weda-ui-custom-
|
|
109
|
+
.weda-ui-custom-picker__column-item.is-selected {
|
|
110
110
|
color: var(--wd-color-brand, #0052d9);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.weda-ui-custom-
|
|
113
|
+
.weda-ui-custom-picker__column-item.is-selected::after {
|
|
114
114
|
content: '';
|
|
115
115
|
display: block;
|
|
116
116
|
width: 8px;
|
|
@@ -123,12 +123,12 @@
|
|
|
123
123
|
right: 10px;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.weda-ui-custom-
|
|
126
|
+
.weda-ui-custom-picker__column-item.multiple.is-selected {
|
|
127
127
|
color: rgba(0, 0, 0, 0.9);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/* theme */
|
|
131
|
-
.weda-ui-custom-
|
|
131
|
+
.weda-ui-custom-picker__column-item.multiple.is-selected::after {
|
|
132
132
|
content: '';
|
|
133
133
|
width: 21px;
|
|
134
134
|
height: 21px;
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
transform: rotate(0);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.weda-ui-custom-
|
|
147
|
+
.weda-ui-custom-picker__column-item.multiple::after {
|
|
148
148
|
content: '';
|
|
149
149
|
width: 20px;
|
|
150
150
|
height: 20px;
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
left: 0px;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
.weda-ui-custom-
|
|
158
|
+
.weda-ui-custom-picker__column-item.is-disabled {
|
|
159
159
|
color: rgba(0, 0, 0, 0.26);
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -315,13 +315,13 @@
|
|
|
315
315
|
display: none;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
.weda-ui-custom-
|
|
318
|
+
.weda-ui-custom-picker__column-item-text.multiple {
|
|
319
319
|
overflow: hidden;
|
|
320
320
|
text-overflow: ellipsis;
|
|
321
321
|
white-space: nowrap;
|
|
322
322
|
margin-left: 30px;
|
|
323
323
|
}
|
|
324
|
-
.weda-ui-custom-
|
|
324
|
+
.weda-ui-custom-picker__column-item-text {
|
|
325
325
|
overflow: hidden;
|
|
326
326
|
text-overflow: ellipsis;
|
|
327
327
|
white-space: nowrap;
|
|
@@ -108,11 +108,18 @@ Component({
|
|
|
108
108
|
return uploadInstance;
|
|
109
109
|
},
|
|
110
110
|
setConfig: function (_config) {
|
|
111
|
-
const { single, maxUploadCount, config } = this.data;
|
|
111
|
+
const { single, maxUploadCount, sourceType, config = {} } = this.data;
|
|
112
112
|
const _maxUploadCount = _config.maxUploadCount ?? maxUploadCount;
|
|
113
113
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
114
|
+
let _sourceType = ['album', 'camera'];
|
|
115
|
+
_sourceType = Array.isArray(sourceType)
|
|
116
|
+
? sourceType
|
|
117
|
+
: ['album', 'camera'].includes(sourceType)
|
|
118
|
+
? [sourceType]
|
|
119
|
+
: ['album', 'camera'];
|
|
120
|
+
|
|
114
121
|
const maxCount = single ? 1 : _maxUploadCount;
|
|
115
|
-
const res = { ...config, count: maxCount,
|
|
122
|
+
const res = { ...config, ..._config, count: maxCount, sourceType: _sourceType };
|
|
116
123
|
this.setData({ config: res });
|
|
117
124
|
},
|
|
118
125
|
deleteHandle: function ({ cloudId }) {
|