sh-tools 2.2.16 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sh-tools",
3
- "version": "2.2.16",
3
+ "version": "2.2.18",
4
4
  "description": "基于fetch和xe-utils二次封装,支持宏公式计算,及notification提示窗",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -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, callvalue, format, nodeKey, labelField, moneyUnit, openValue, openLabel, closeValue, closeLabel, defaultValue } = renderProps || {}
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 (!$vUtils.isNone(value) && format) {
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
@@ -265,9 +269,6 @@ export default {
265
269
  if ($vUtils.isString(rvalue)) {
266
270
  rvalue = $vUtils.replaceNutrim(rvalue)
267
271
  }
268
- if (formula && !callvalue) {
269
- $vUtils.set(rowData, key, rvalue)
270
- }
271
272
  if ($vUtils.isNone(rtext) && !$vUtils.isNone(rvalue)) {
272
273
  rtext = rvalue
273
274
  }