@donglegeyu/company-ui 1.2.29 → 1.2.30
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/cjs/template-components/FormPageTemplate/index.d.ts +5 -1
- package/dist/cjs/template-components/FormPageTemplate/index.js +5 -2
- package/dist/cjs/template-components/FormPageTemplate/index.scss +4 -0
- package/dist/es/template-components/FormPageTemplate/index.d.ts +5 -1
- package/dist/es/template-components/FormPageTemplate/index.js +8 -3
- package/dist/es/template-components/FormPageTemplate/index.scss +4 -0
- package/package.json +1 -1
|
@@ -15,6 +15,10 @@ interface FormPageTemplateProps {
|
|
|
15
15
|
titleExtra?: ReactNode;
|
|
16
16
|
/** 标题栏最右侧的独立操作区:与标题解耦(如按钮组) */
|
|
17
17
|
titleActions?: ReactNode;
|
|
18
|
+
/** 内容区顶部插槽:渲染在 children 之上,跟随内容滚动(如 Steps、提示信息) */
|
|
19
|
+
topContent?: ReactNode;
|
|
20
|
+
/** 自定义底部:传了则覆盖默认的 FormFooterActions */
|
|
21
|
+
footer?: ReactNode;
|
|
18
22
|
/** 内容区是否包裹 CompanyCard,默认 true(多列表单场景);自定义内容时可设为 false */
|
|
19
23
|
contentWrapped?: boolean;
|
|
20
24
|
/** 内容区自定义 className */
|
|
@@ -23,5 +27,5 @@ interface FormPageTemplateProps {
|
|
|
23
27
|
contentStyle?: React.CSSProperties;
|
|
24
28
|
children?: ReactNode;
|
|
25
29
|
}
|
|
26
|
-
export default function FormPageTemplate({ title, showBack, onBack, submitLoading, submitText, cancelText, showFooter, footerPosition, onSubmit, onCancel, titleExtra, titleActions, contentWrapped, contentClassName, contentStyle, children, }: FormPageTemplateProps): import("react").JSX.Element;
|
|
30
|
+
export default function FormPageTemplate({ title, showBack, onBack, submitLoading, submitText, cancelText, showFooter, footerPosition, onSubmit, onCancel, titleExtra, titleActions, topContent, footer, contentWrapped, contentClassName, contentStyle, children, }: FormPageTemplateProps): import("react").JSX.Element;
|
|
27
31
|
export {};
|
|
@@ -51,6 +51,8 @@ function FormPageTemplate({
|
|
|
51
51
|
onCancel,
|
|
52
52
|
titleExtra,
|
|
53
53
|
titleActions,
|
|
54
|
+
topContent,
|
|
55
|
+
footer,
|
|
54
56
|
contentWrapped = true,
|
|
55
57
|
contentClassName,
|
|
56
58
|
contentStyle,
|
|
@@ -94,8 +96,9 @@ function FormPageTemplate({
|
|
|
94
96
|
style: contentStyle,
|
|
95
97
|
onScroll: handleScroll,
|
|
96
98
|
children: [
|
|
99
|
+
topContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "form-page-top-content", children: topContent }),
|
|
97
100
|
contentWrapped ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_basic_components.CompanyCard, { className: "form-page-card", children }) : children,
|
|
98
|
-
showFooter && footerPosition === "static" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "form-page-footer static", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
101
|
+
showFooter && footerPosition === "static" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "form-page-footer static", children: footer ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
102
|
import_FormFooterActions.default,
|
|
100
103
|
{
|
|
101
104
|
submitLoading,
|
|
@@ -108,7 +111,7 @@ function FormPageTemplate({
|
|
|
108
111
|
]
|
|
109
112
|
}
|
|
110
113
|
),
|
|
111
|
-
showFooter && footerPosition === "fixed" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "form-page-footer fixed", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
114
|
+
showFooter && footerPosition === "fixed" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "form-page-footer fixed", children: footer ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
115
|
import_FormFooterActions.default,
|
|
113
116
|
{
|
|
114
117
|
submitLoading,
|
|
@@ -15,6 +15,10 @@ interface FormPageTemplateProps {
|
|
|
15
15
|
titleExtra?: ReactNode;
|
|
16
16
|
/** 标题栏最右侧的独立操作区:与标题解耦(如按钮组) */
|
|
17
17
|
titleActions?: ReactNode;
|
|
18
|
+
/** 内容区顶部插槽:渲染在 children 之上,跟随内容滚动(如 Steps、提示信息) */
|
|
19
|
+
topContent?: ReactNode;
|
|
20
|
+
/** 自定义底部:传了则覆盖默认的 FormFooterActions */
|
|
21
|
+
footer?: ReactNode;
|
|
18
22
|
/** 内容区是否包裹 CompanyCard,默认 true(多列表单场景);自定义内容时可设为 false */
|
|
19
23
|
contentWrapped?: boolean;
|
|
20
24
|
/** 内容区自定义 className */
|
|
@@ -23,5 +27,5 @@ interface FormPageTemplateProps {
|
|
|
23
27
|
contentStyle?: React.CSSProperties;
|
|
24
28
|
children?: ReactNode;
|
|
25
29
|
}
|
|
26
|
-
export default function FormPageTemplate({ title, showBack, onBack, submitLoading, submitText, cancelText, showFooter, footerPosition, onSubmit, onCancel, titleExtra, titleActions, contentWrapped, contentClassName, contentStyle, children, }: FormPageTemplateProps): import("react").JSX.Element;
|
|
30
|
+
export default function FormPageTemplate({ title, showBack, onBack, submitLoading, submitText, cancelText, showFooter, footerPosition, onSubmit, onCancel, titleExtra, titleActions, topContent, footer, contentWrapped, contentClassName, contentStyle, children, }: FormPageTemplateProps): import("react").JSX.Element;
|
|
27
31
|
export {};
|
|
@@ -28,6 +28,8 @@ export default function FormPageTemplate(_ref) {
|
|
|
28
28
|
onCancel = _ref.onCancel,
|
|
29
29
|
titleExtra = _ref.titleExtra,
|
|
30
30
|
titleActions = _ref.titleActions,
|
|
31
|
+
topContent = _ref.topContent,
|
|
32
|
+
footer = _ref.footer,
|
|
31
33
|
_ref$contentWrapped = _ref.contentWrapped,
|
|
32
34
|
contentWrapped = _ref$contentWrapped === void 0 ? true : _ref$contentWrapped,
|
|
33
35
|
contentClassName = _ref.contentClassName,
|
|
@@ -69,12 +71,15 @@ export default function FormPageTemplate(_ref) {
|
|
|
69
71
|
className: "form-page-content".concat(isScrolling ? " scrolling" : "").concat(contentClassName ? " ".concat(contentClassName) : ""),
|
|
70
72
|
style: contentStyle,
|
|
71
73
|
onScroll: handleScroll,
|
|
72
|
-
children: [
|
|
74
|
+
children: [topContent && /*#__PURE__*/_jsx("div", {
|
|
75
|
+
className: "form-page-top-content",
|
|
76
|
+
children: topContent
|
|
77
|
+
}), contentWrapped ? /*#__PURE__*/_jsx(CompanyCard, {
|
|
73
78
|
className: "form-page-card",
|
|
74
79
|
children: children
|
|
75
80
|
}) : children, showFooter && footerPosition === "static" && /*#__PURE__*/_jsx("div", {
|
|
76
81
|
className: "form-page-footer static",
|
|
77
|
-
children: /*#__PURE__*/_jsx(FormFooterActions, {
|
|
82
|
+
children: footer !== null && footer !== void 0 ? footer : /*#__PURE__*/_jsx(FormFooterActions, {
|
|
78
83
|
submitLoading: submitLoading,
|
|
79
84
|
submitText: submitText,
|
|
80
85
|
cancelText: cancelText,
|
|
@@ -84,7 +89,7 @@ export default function FormPageTemplate(_ref) {
|
|
|
84
89
|
})]
|
|
85
90
|
}), showFooter && footerPosition === "fixed" && /*#__PURE__*/_jsx("div", {
|
|
86
91
|
className: "form-page-footer fixed",
|
|
87
|
-
children: /*#__PURE__*/_jsx(FormFooterActions, {
|
|
92
|
+
children: footer !== null && footer !== void 0 ? footer : /*#__PURE__*/_jsx(FormFooterActions, {
|
|
88
93
|
submitLoading: submitLoading,
|
|
89
94
|
submitText: submitText,
|
|
90
95
|
cancelText: cancelText,
|