zmdms-webui 2.2.5 → 2.2.6

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.
@@ -1,17 +1,16 @@
1
1
  import { __rest, __assign } from '../_virtual/_tslib.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { memo } from 'react';
4
+ import { Form, Col, Tooltip } from 'antd';
4
5
  import classNames from '../node_modules/classnames/index.js';
5
6
  import '../config/ZtxkContext.js';
6
7
  import isEqual from '../config/isEqual.js';
7
- import MemoForm from '../form/form.js';
8
8
  import QuestionCircleOutlined from '../node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js';
9
- import { Col, Tooltip } from 'antd';
10
9
 
11
10
  var hiddenLabelCol = { span: 0 };
12
11
  var FormItem = function (props) {
13
12
  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"]);
14
- var form = MemoForm.useFormInstance();
13
+ var form = Form.useFormInstance();
15
14
  // 根据配置属性,判断是否渲染表单项
16
15
  // 是否显示表单项
17
16
  if (isDisplay === false || isDisplay === "0") {
@@ -74,8 +73,8 @@ var FormItem = function (props) {
74
73
  resetProps.labelCol = hiddenLabelCol;
75
74
  }
76
75
  if (dependencies) {
77
- return (jsxs(ItemWrap, __assign({ width: width, className: className, tipString: tipString }, { children: [preNode ? preNode : null, jsx(MemoForm.Item, __assign({ dependencies: dependencies, noStyle: true }, { children: function (formInstance) {
78
- return (jsx(MemoForm.Item, __assign({}, resetProps, { className: itemClasses }, { children: render && render(itemProps, formInstance) })));
76
+ return (jsxs(ItemWrap, __assign({ width: width, className: className, tipString: tipString }, { children: [preNode ? preNode : null, jsx(Form.Item, __assign({ dependencies: dependencies, noStyle: true }, { children: function (formInstance) {
77
+ return (jsx(Form.Item, __assign({}, resetProps, { className: itemClasses }, { children: render && render(itemProps, formInstance) })));
79
78
  } })), nextNode ? nextNode : null] })));
80
79
  }
81
80
  if (shouldUpdate !== undefined || shouldUpdateNames) {
@@ -96,7 +95,7 @@ var FormItem = function (props) {
96
95
  return false;
97
96
  }
98
97
  : shouldUpdate;
99
- return (jsx(MemoForm.Item, __assign({ shouldUpdate: shouldUpdateHandle, noStyle: true }, { children: function (formInstance) {
98
+ return (jsx(Form.Item, __assign({ shouldUpdate: shouldUpdateHandle, noStyle: true }, { children: function (formInstance) {
100
99
  if (typeof isDisplay === "function") {
101
100
  var isD = isDisplay(form);
102
101
  if (!isD) {
@@ -118,10 +117,10 @@ var FormItem = function (props) {
118
117
  itemClasses = itemClasses.replace(" ztxk-form__item--disabled", "");
119
118
  }
120
119
  }
121
- return resetProps.name ? (jsxs(ItemWrap, __assign({ width: width, className: className, tipString: tipString }, { children: [preNode ? preNode : null, jsx(MemoForm.Item, __assign({}, resetProps, { className: itemClasses }, { children: render && render(itemProps, formInstance) })), nextNode ? nextNode : null] }))) : (jsxs(ItemWrap, __assign({ width: width, className: className, tipString: tipString }, { children: [preNode ? preNode : null, render && render(itemProps, formInstance), nextNode ? nextNode : null] })));
120
+ return resetProps.name ? (jsxs(ItemWrap, __assign({ width: width, className: className, tipString: tipString }, { children: [preNode ? preNode : null, jsx(Form.Item, __assign({}, resetProps, { className: itemClasses }, { children: render && render(itemProps, formInstance) })), nextNode ? nextNode : null] }))) : (jsxs(ItemWrap, __assign({ width: width, className: className, tipString: tipString }, { children: [preNode ? preNode : null, render && render(itemProps, formInstance), nextNode ? nextNode : null] })));
122
121
  } })));
123
122
  }
124
- return (jsxs(ItemWrap, __assign({ width: width, className: className, tipString: tipString }, { children: [preNode ? preNode : null, jsx(MemoForm.Item, __assign({}, resetProps, { className: itemClasses }, { children: render ? render(itemProps, form) : children })), nextNode ? nextNode : null] })));
123
+ return (jsxs(ItemWrap, __assign({ width: width, className: className, tipString: tipString }, { children: [preNode ? preNode : null, jsx(Form.Item, __assign({}, resetProps, { className: itemClasses }, { children: render ? render(itemProps, form) : children })), nextNode ? nextNode : null] })));
125
124
  };
126
125
  function getWidthNum(width) {
127
126
  if (typeof width === "number") {
@@ -14,7 +14,7 @@ var Input = function (props, ref) {
14
14
  (_a = props.onPressEnter) === null || _a === void 0 ? void 0 : _a.call(props, e);
15
15
  onSearch === null || onSearch === void 0 ? void 0 : onSearch();
16
16
  }
17
- : undefined })));
17
+ : props.onPressEnter })));
18
18
  };
19
19
  var MemoInput = memo(forwardRef(Input));
20
20
  MemoInput.displayName = "ZTXK_WEBUI_Input";
@@ -36,7 +36,7 @@ var InputNumber = function (props, ref) {
36
36
  (_a = props.onPressEnter) === null || _a === void 0 ? void 0 : _a.call(props, e);
37
37
  onSearch === null || onSearch === void 0 ? void 0 : onSearch();
38
38
  }
39
- : undefined })));
39
+ : props.onPressEnter })));
40
40
  };
41
41
  InputNumber.displayName = "ZTXK_WEBUI_InputNumber";
42
42
  var InputNumber$1 = memo(forwardRef(InputNumber));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-webui",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "private": false,
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",