sh-tools 2.1.0 → 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 -3
package/package.json
CHANGED
package/packages/utils/other.js
CHANGED
|
@@ -199,7 +199,6 @@ export default {
|
|
|
199
199
|
case '$vTime':
|
|
200
200
|
format = format ? format.replace('YYYY', 'yyyy').replace('DD', 'dd').replace('hh', 'HH') : defaultDateFormat[type]
|
|
201
201
|
if (!$vUtils.isNone(value) && format) rvalue = $vUtils.toDateString(value, format)
|
|
202
|
-
if ($vUtils.isDate(value)) $vUtils.set(rowData, key, rvalue)
|
|
203
202
|
break
|
|
204
203
|
case '$vSelect':
|
|
205
204
|
case '$vCheckgroup':
|
|
@@ -223,12 +222,16 @@ export default {
|
|
|
223
222
|
.filter(_ => _ && _ !== 'undefined')
|
|
224
223
|
}
|
|
225
224
|
if (options && options.length) {
|
|
226
|
-
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
|
+
})
|
|
227
229
|
rtext = rns.join(split)
|
|
228
230
|
}
|
|
229
231
|
rvalue = oriArray
|
|
230
232
|
} else {
|
|
231
|
-
|
|
233
|
+
let valueOption = options.find(option => $vUtils.isEqual(option[optionValue], orv))
|
|
234
|
+
rtext = valueOption ? valueOption[optionLabel] : ''
|
|
232
235
|
rvalue = type === '$vTree' ? (value ? [value] : []) : value
|
|
233
236
|
}
|
|
234
237
|
if (format) {
|