sh-tools 2.1.4 → 2.1.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/package.json +1 -1
- package/packages/utils/other.js +6 -3
package/package.json
CHANGED
package/packages/utils/other.js
CHANGED
|
@@ -198,7 +198,8 @@ export default {
|
|
|
198
198
|
break
|
|
199
199
|
case '$vTime':
|
|
200
200
|
format = format ? format.replace('YYYY', 'yyyy').replace('DD', 'dd').replace('hh', 'HH') : defaultDateFormat[type]
|
|
201
|
-
if (
|
|
201
|
+
if ($vUtils.isNumber(value)) value = String(value)
|
|
202
|
+
if (!$vUtils.isNone(value) && format) $vUtils.toDateString(value, format)
|
|
202
203
|
break
|
|
203
204
|
case '$vSelect':
|
|
204
205
|
case '$vCheckgroup':
|
|
@@ -230,8 +231,10 @@ export default {
|
|
|
230
231
|
}
|
|
231
232
|
rvalue = oriArray
|
|
232
233
|
} else {
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
if (options && options.length) {
|
|
235
|
+
let valueOption = options.find(option => $vUtils.isEqual(option[optionValue], value))
|
|
236
|
+
rtext = valueOption ? valueOption[optionLabel] : ''
|
|
237
|
+
}
|
|
235
238
|
rvalue = rname === '$vTree' ? (value ? [value] : []) : value
|
|
236
239
|
}
|
|
237
240
|
if (format) {
|