zmdms-webui 2.1.2 → 2.1.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.
@@ -107,6 +107,10 @@ interface IFormItem extends FormItemProps {
107
107
  * 布局
108
108
  */
109
109
  directionColumn?: boolean;
110
+ /**
111
+ * 额外的组件,不用走formItem
112
+ */
113
+ outsideRender?: (itemProps: any, formInstance?: FormInstance<any>) => React__default.ReactNode;
110
114
  }
111
115
  declare const _default: React__default.NamedExoticComponent<IFormItem & {
112
116
  outsideState: any;
@@ -10,11 +10,14 @@ import { Col, Tooltip } from 'antd';
10
10
 
11
11
  var hiddenLabelCol = { span: 0 };
12
12
  var FormItem = function (props) {
13
- var children = props.children, isDisplay = props.isDisplay, isRequired = props.isRequired, isChangeable = props.isChangeable, isStress = props.isStress, preNode = props.preNode, nextNode = props.nextNode; props.dynamicDisabled; var hiddenBorder = props.hiddenBorder, singleSelectShowBorder = props.singleSelectShowBorder, singleSelect = props.singleSelect, hiddenLabel = props.hiddenLabel, width = props.width, className = props.className, itemClassName = props.itemClassName, render = props.render, shouldUpdateNames = props.shouldUpdateNames; props.shouldUpdateClear; var dependencies = props.dependencies, shouldUpdate = props.shouldUpdate; props.index; props.outsideState; props.shouldUpdateBeOutsideState; props.nonForm; var isCustomItem = props.isCustomItem, customStyle = props.customStyle, tipString = props.tipString, directionColumn = props.directionColumn, divider = props.divider, resetProps = __rest(props, ["children", "isDisplay", "isRequired", "isChangeable", "isStress", "preNode", "nextNode", "dynamicDisabled", "hiddenBorder", "singleSelectShowBorder", "singleSelect", "hiddenLabel", "width", "className", "itemClassName", "render", "shouldUpdateNames", "shouldUpdateClear", "dependencies", "shouldUpdate", "index", "outsideState", "shouldUpdateBeOutsideState", "nonForm", "isCustomItem", "customStyle", "tipString", "directionColumn", "divider"]);
13
+ var children = props.children, isDisplay = props.isDisplay, isRequired = props.isRequired, isChangeable = props.isChangeable, isStress = props.isStress, preNode = props.preNode, nextNode = props.nextNode; props.dynamicDisabled; var hiddenBorder = props.hiddenBorder, singleSelectShowBorder = props.singleSelectShowBorder, singleSelect = props.singleSelect, hiddenLabel = props.hiddenLabel, width = props.width, className = props.className, itemClassName = props.itemClassName, render = props.render, shouldUpdateNames = props.shouldUpdateNames; props.shouldUpdateClear; var dependencies = props.dependencies, shouldUpdate = props.shouldUpdate; props.index; props.outsideState; props.shouldUpdateBeOutsideState; props.nonForm; var isCustomItem = props.isCustomItem, customStyle = props.customStyle, tipString = props.tipString, directionColumn = props.directionColumn, divider = props.divider, outsideRender = props.outsideRender, resetProps = __rest(props, ["children", "isDisplay", "isRequired", "isChangeable", "isStress", "preNode", "nextNode", "dynamicDisabled", "hiddenBorder", "singleSelectShowBorder", "singleSelect", "hiddenLabel", "width", "className", "itemClassName", "render", "shouldUpdateNames", "shouldUpdateClear", "dependencies", "shouldUpdate", "index", "outsideState", "shouldUpdateBeOutsideState", "nonForm", "isCustomItem", "customStyle", "tipString", "directionColumn", "divider", "outsideRender"]);
14
14
  var form = MemoForm.useFormInstance();
15
15
  if (divider) {
16
16
  return (jsx(ItemWrap, { width: width, className: className, tipString: tipString, style: { paddingBottom: 0 } }));
17
17
  }
18
+ if (outsideRender) {
19
+ return (jsx(ItemWrap, __assign({ width: width, className: className, tipString: tipString, style: { paddingBottom: 0, display: "block" } }, { children: outsideRender(resetProps, form) })));
20
+ }
18
21
  // 更新是否必填配置
19
22
  var updateIsRequired = function (isRequired) {
20
23
  var _a;
@@ -10,7 +10,7 @@ function useSummary(summaryConfig, columns, options) {
10
10
  // 是否存在选择项
11
11
  var isRowSelection = rowSelection ? true : false;
12
12
  // 是否存在可展开
13
- var isExpandable = expandable ? true : false;
13
+ var isExpandable = (expandable === null || expandable === void 0 ? void 0 : expandable.expandedRowRender) ? true : false;
14
14
  // 增减 体现再cloumns里面 所以需要额外处理
15
15
  var isAddOrDel = isAdd || isDel ? true : false;
16
16
  var fillNumber = Number(isRowSelection) + Number(isExpandable);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-webui",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "private": false,
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",