zmdms-webui 2.1.4 → 2.1.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.
- package/dist/es/formitem/formItem.js +11 -11
- package/package.json +1 -1
|
@@ -12,6 +12,17 @@ var hiddenLabelCol = { span: 0 };
|
|
|
12
12
|
var FormItem = function (props) {
|
|
13
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
|
+
// 根据配置属性,判断是否渲染表单项
|
|
16
|
+
// 是否显示表单项
|
|
17
|
+
if (isDisplay === false || isDisplay === "0") {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
if (typeof isDisplay === "function") {
|
|
21
|
+
var isD = isDisplay(form);
|
|
22
|
+
if (!isD) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
15
26
|
if (divider) {
|
|
16
27
|
return (jsx(ItemWrap, { width: width, className: className, tipString: tipString, style: { paddingBottom: 0 } }));
|
|
17
28
|
}
|
|
@@ -46,11 +57,6 @@ var FormItem = function (props) {
|
|
|
46
57
|
}
|
|
47
58
|
resetProps.rules = rules;
|
|
48
59
|
};
|
|
49
|
-
// 根据配置属性,判断是否渲染表单项
|
|
50
|
-
// 是否显示表单项
|
|
51
|
-
if (isDisplay === false || isDisplay === "0") {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
60
|
// 是否必填
|
|
55
61
|
if (isRequired !== undefined && typeof isRequired !== "function") {
|
|
56
62
|
updateIsRequired(isRequired);
|
|
@@ -100,12 +106,6 @@ var FormItem = function (props) {
|
|
|
100
106
|
}
|
|
101
107
|
: shouldUpdate;
|
|
102
108
|
return (jsx(MemoForm.Item, __assign({ shouldUpdate: shouldUpdateHandle, noStyle: true }, { children: function (formInstance) {
|
|
103
|
-
if (typeof isDisplay === "function") {
|
|
104
|
-
var isD = isDisplay(form);
|
|
105
|
-
if (!isD) {
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
109
|
if (typeof isRequired === "function") {
|
|
110
110
|
var isR = isRequired(form);
|
|
111
111
|
updateIsRequired(isR);
|