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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sh-tools",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "基于xe-ajax和xe-utils二次封装",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -222,12 +222,16 @@ export default {
222
222
  .filter(_ => _ && _ !== 'undefined')
223
223
  }
224
224
  if (options && options.length) {
225
- let rns = oriArray.map(orv => options.find(option => $vUtils.isEqual(option[optionValue], orv))[optionLabel] || '')
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
- rtext = options.find(opt => $vUtils.isEqual(opt[optionValue], value))[optionLabel] || ''
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) {