linkmore-design 1.1.27-beta.3 → 1.1.27-beta.4

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/dist/index.umd.js CHANGED
@@ -223939,14 +223939,18 @@
223939
223939
  }
223940
223940
  calc(item, [[dataIndex, expression]], history);
223941
223941
  });
223942
- console.log(history);
223943
223942
  if (history && history.length) {
223944
223943
  var sum = 0;
223945
223944
  history.forEach(function (h) {
223946
223945
  sum += h.sum;
223947
223946
  });
223948
223947
  history.forEach(function (h) {
223949
- h.item[h.dataIndex] = (h.sum / sum * 100).toFixed(2) + '%';
223948
+ if (sum < 0.000001) {
223949
+ sum = 0;
223950
+ h.item[h.dataIndex] = '0%';
223951
+ } else {
223952
+ h.item[h.dataIndex] = (h.sum / sum * 100).toFixed(2) + '%';
223953
+ }
223950
223954
  h.item["".concat(h.dataIndex, "_sum")] = sum;
223951
223955
  });
223952
223956
  }
@@ -224001,12 +224005,12 @@
224001
224005
  }
224002
224006
  };
224003
224007
  if (record && record._group && isShowSelect && (col === null || col === void 0 ? void 0 : col.dataIndex)) {
224004
- return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread(_objectSpread({}, rest), {}, {
224008
+ return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread({}, rest), /*#__PURE__*/React__default['default'].createElement("div", {
224005
224009
  style: {
224006
224010
  display: 'flex',
224007
224011
  alignItems: 'center'
224008
224012
  }
224009
- }), /*#__PURE__*/React__default['default'].createElement("span", null, record[col.dataIndex]), /*#__PURE__*/React__default['default'].createElement(LMSelect, {
224013
+ }, /*#__PURE__*/React__default['default'].createElement("span", null, record[col.dataIndex]), /*#__PURE__*/React__default['default'].createElement(LMSelect, {
224010
224014
  className: "calc-select",
224011
224015
  value: record["".concat(col.dataIndex, "_exp")],
224012
224016
  size: "small",
@@ -224020,7 +224024,7 @@
224020
224024
  value: item.value,
224021
224025
  key: item.value
224022
224026
  }, item.label);
224023
- })));
224027
+ }))));
224024
224028
  }
224025
224029
  return /*#__PURE__*/React__default['default'].createElement("td", _objectSpread({}, rest), children);
224026
224030
  };