sh-tools 2.2.17 → 2.2.18
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
|
@@ -148,7 +148,8 @@ export default {
|
|
|
148
148
|
// editable: 是否对返回值进行修正 默认 否
|
|
149
149
|
let rvalue, rtext, rname
|
|
150
150
|
let { $vUtils, $vxePluginNames } = renderContext
|
|
151
|
-
let { min, max, digits, type, multiple, split, options, format, nodeKey, labelField, moneyUnit, openValue, openLabel, closeValue, closeLabel, defaultValue } =
|
|
151
|
+
let { min, max, digits, type, multiple, split, options, format, range, nodeKey, labelField, moneyUnit, openValue, openLabel, closeValue, closeLabel, defaultValue, separator } =
|
|
152
|
+
renderProps || {}
|
|
152
153
|
let defaultDateFormat = {
|
|
153
154
|
date: 'yyyy-MM-dd',
|
|
154
155
|
time: 'HH:mm:ss',
|
|
@@ -201,7 +202,10 @@ export default {
|
|
|
201
202
|
case '$vTime':
|
|
202
203
|
format = format ? format.replace('YYYY', 'yyyy').replace('DD', 'dd').replace('hh', 'HH') : defaultDateFormat[type]
|
|
203
204
|
if ($vUtils.isNumber(value)) value = String(value)
|
|
204
|
-
if (
|
|
205
|
+
if (range && Array.isArray(value) && format) {
|
|
206
|
+
rvalue = value.map(item => $vUtils.toDateString(item || '', format))
|
|
207
|
+
rtext = rvalue.join(separator)
|
|
208
|
+
} else if (!$vUtils.isNone(value) && format) {
|
|
205
209
|
rvalue = $vUtils.toDateString(value, format)
|
|
206
210
|
}
|
|
207
211
|
break
|