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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sh-tools",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "description": "基于xe-ajax和xe-utils二次封装",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -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 (!$vUtils.isNone(value) && format) rvalue = $vUtils.toDateString(value, format)
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
- let valueOption = options.find(option => $vUtils.isEqual(option[optionValue], value))
234
- rtext = valueOption ? valueOption[optionLabel] : ''
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) {