sh-tools 2.2.9 → 2.2.11

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.9",
3
+ "version": "2.2.11",
4
4
  "description": "基于fetch和xe-utils二次封装,支持宏公式计算,及notification提示窗",
5
5
  "main": "packages/index.js",
6
6
  "scripts": {
@@ -19,7 +19,7 @@ function notice(type, options) {
19
19
  for (let i = idx + 1; i < inss.length; i++) {
20
20
  const cmpcss = getComputedStyle(inss[i].$el)
21
21
  const y = parseInt(cmpcss[ykey]) || 0
22
- inss[i].show(y - ins.$el.offsetHeight - offset + 'px')
22
+ inss[i].show(y - ins.$el.offsetHeight - option.offset + 'px')
23
23
  }
24
24
  instances = instances.filter(n => n.id !== nid)
25
25
  }
@@ -148,7 +148,7 @@ export default {
148
148
  // editable: 是否对返回值进行修正 默认 否
149
149
  let rvalue, rtext, rname
150
150
  let { $vUtils, $vxePluginNames } = renderContext
151
- let { min, max, formula, digits, type, multiple, split, range, options, format, nodeKey, labelField, moneyUnit, commafy, openValue, openLabel, closeValue, closeLabel, bill, defaultValue } = renderProps
151
+ let { min, max, digits, type, multiple, split, range, options, format, nodeKey, labelField, moneyUnit, commafy, openValue, openLabel, closeValue, closeLabel, bill, defaultValue } = renderProps
152
152
  let defaultDateFormat = {
153
153
  date: 'yyyy-MM-dd',
154
154
  time: 'HH:mm:ss',
@@ -167,6 +167,8 @@ export default {
167
167
  let oriArray = []
168
168
  // 是否需要对原值进行重写 默认为false
169
169
  let resetValue = false
170
+ // 配置公式,优先取解析后的嵌套公式
171
+ let formula = $vUtils.get(renderProps, `formulaMap[${key}]`) || renderProps.formula
170
172
  // 进行默认赋值 若没有任何解析原数返回
171
173
  rvalue = value
172
174
  if (!$vUtils.isNone(defaultValue) && $vUtils.isNone(value)) {