sh-tools 2.1.1 → 2.1.2
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 +1 -1
- package/packages/utils/other.js +6 -2
package/package.json
CHANGED
package/packages/utils/other.js
CHANGED
|
@@ -222,12 +222,16 @@ export default {
|
|
|
222
222
|
.filter(_ => _ && _ !== 'undefined')
|
|
223
223
|
}
|
|
224
224
|
if (options && options.length) {
|
|
225
|
-
let rns = oriArray.map(orv =>
|
|
225
|
+
let rns = oriArray.map(orv => {
|
|
226
|
+
let valueOption = options.find(option => $vUtils.isEqual(option[optionValue], orv))
|
|
227
|
+
return valueOption ? valueOption[optionLabel] : ''
|
|
228
|
+
})
|
|
226
229
|
rtext = rns.join(split)
|
|
227
230
|
}
|
|
228
231
|
rvalue = oriArray
|
|
229
232
|
} else {
|
|
230
|
-
|
|
233
|
+
let valueOption = options.find(option => $vUtils.isEqual(option[optionValue], orv))
|
|
234
|
+
rtext = valueOption ? valueOption[optionLabel] : ''
|
|
231
235
|
rvalue = type === '$vTree' ? (value ? [value] : []) : value
|
|
232
236
|
}
|
|
233
237
|
if (format) {
|