@cloudbase/weda-ui-mp 3.19.0 → 3.20.1
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.
|
@@ -147,7 +147,7 @@ Component({
|
|
|
147
147
|
_option = range;
|
|
148
148
|
}
|
|
149
149
|
const label = this.getLabels(value, _option);
|
|
150
|
-
const checkRange = this.getChecks(value, _option);
|
|
150
|
+
const checkRange = this.getChecks(value, _option, this.data.displayValue);
|
|
151
151
|
// 默认
|
|
152
152
|
this.setData({
|
|
153
153
|
option: checkRange,
|
|
@@ -284,13 +284,13 @@ Component({
|
|
|
284
284
|
this._fetchData({ pageNo, searchValue });
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
|
-
getLabels: function (values, options) {
|
|
287
|
+
getLabels: function (values, options, _preLabel) {
|
|
288
288
|
let labels = values;
|
|
289
289
|
if (Array.isArray(values) && Array.isArray(options)) {
|
|
290
290
|
const rm = arrayToMap(options, 'value');
|
|
291
291
|
labels = values.map((d) => {
|
|
292
292
|
const obj = rm[d];
|
|
293
|
-
let item = lodashGet(obj, 'text') ?? lodashGet(obj, 'label') ?? d;
|
|
293
|
+
let item = lodashGet(obj, 'text') ?? lodashGet(obj, 'label') ?? _preLabel ?? d;
|
|
294
294
|
return textToString(item);
|
|
295
295
|
});
|
|
296
296
|
}
|