@donglegeyu/company-ui 1.2.24 → 1.2.26
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/DetailPageTemplate/index.scss +1 -1
- package/dist/cjs/template-components/FormPageTemplate/index.scss +1 -1
- package/dist/cjs/template-components/SmartListTemplate/index.scss +1 -1
- package/dist/cjs/template-components/StatisticsListPage/index.d.ts +2 -0
- package/dist/cjs/template-components/StatisticsListPage/index.js +7 -4
- package/dist/cjs/template-components/StatisticsListPage/index.scss +21 -3
- package/dist/es/template-components/DetailPageTemplate/index.scss +1 -1
- package/dist/es/template-components/FormPageTemplate/index.scss +1 -1
- package/dist/es/template-components/SmartListTemplate/index.scss +1 -1
- package/dist/es/template-components/StatisticsListPage/index.d.ts +2 -0
- package/dist/es/template-components/StatisticsListPage/index.js +12 -6
- package/dist/es/template-components/StatisticsListPage/index.scss +21 -3
- package/package.json +1 -1
|
@@ -50,6 +50,8 @@ export interface StatisticsListPageProps<T = Record<string, unknown>> {
|
|
|
50
50
|
titleSuffix?: ReactNode;
|
|
51
51
|
/** 紧跟标题右侧的区域:标题的延伸/补充(如月份选择器、状态标签) */
|
|
52
52
|
titleExtra?: ReactNode;
|
|
53
|
+
/** 是否显示 titleExtra 前置分割线,标题后跟标签等强关联场景可设为 false | `true` */
|
|
54
|
+
showTitleExtraDivider?: boolean;
|
|
53
55
|
/** 标题栏最右侧的独立操作区:与标题解耦(如按钮组、描述+link) */
|
|
54
56
|
titleActions?: ReactNode;
|
|
55
57
|
/** 统计卡片区配置(不传则不渲染卡片区) */
|
|
@@ -76,6 +76,7 @@ var StatisticsListPage = (props) => {
|
|
|
76
76
|
title = "统计列表",
|
|
77
77
|
titleSuffix,
|
|
78
78
|
titleExtra,
|
|
79
|
+
showTitleExtraDivider = true,
|
|
79
80
|
titleActions,
|
|
80
81
|
statisticCards,
|
|
81
82
|
searchPlaceholder = "请输入",
|
|
@@ -259,15 +260,17 @@ var StatisticsListPage = (props) => {
|
|
|
259
260
|
const handleColumnSettingsClick = (0, import_react.useCallback)(() => {
|
|
260
261
|
import_basic_components.CompanyMessage.info("请在业务侧通过 columns 属性控制列显示/隐藏");
|
|
261
262
|
}, []);
|
|
263
|
+
const extraNode = titleExtra ?? titleSuffix;
|
|
264
|
+
const titleExtraNode = extraNode ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "slp-title-extra", children: [
|
|
265
|
+
showTitleExtraDivider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "slp-divider" }),
|
|
266
|
+
extraNode
|
|
267
|
+
] }) : void 0;
|
|
262
268
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatisticsErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `statistics-list-page${className ? ` ${className}` : ""}`, children: [
|
|
263
269
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
264
270
|
import_shared_components.PageTitle,
|
|
265
271
|
{
|
|
266
272
|
title,
|
|
267
|
-
titleExtra:
|
|
268
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "slp-divider" }),
|
|
269
|
-
titleSuffix
|
|
270
|
-
] }) : void 0),
|
|
273
|
+
titleExtra: titleExtraNode,
|
|
271
274
|
actions: titleActions
|
|
272
275
|
}
|
|
273
276
|
),
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
padding: 0 calc(var(--spacing-sm, 12) * 1px);
|
|
7
7
|
background: #f5f5f5;
|
|
8
8
|
|
|
9
|
-
// 标题区右侧槽位布局(对齐
|
|
10
|
-
|
|
9
|
+
// 标题区右侧槽位布局(对齐 SmartListTemplate:分割线左右间距对称 16px)
|
|
10
|
+
// 注:PageTitle 内部 .page-title-left 已有 gap:8px,此处补 8px margin-left 凑齐 16px
|
|
11
|
+
.slp-title-extra {
|
|
11
12
|
display: flex;
|
|
12
13
|
align-items: center;
|
|
13
14
|
gap: calc(var(--spacing-md, 16) * 1px);
|
|
@@ -16,10 +17,27 @@
|
|
|
16
17
|
|
|
17
18
|
.slp-divider {
|
|
18
19
|
width: 1px;
|
|
19
|
-
height:
|
|
20
|
+
height: 16px;
|
|
20
21
|
background: var(--color-border, rgba(5, 5, 5, 0.15));
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
// 月份选择器触发按钮:伪装成纯文字,去掉按钮边距与 hover 背景
|
|
25
|
+
// 对齐 SmartListTemplate 的 .dropdown-text-btn 既定模式(antd Button 深度定制场景)
|
|
26
|
+
.slp-month-trigger.ant-btn {
|
|
27
|
+
padding-inline: 0 !important;
|
|
28
|
+
background: transparent !important;
|
|
29
|
+
border-color: transparent !important;
|
|
30
|
+
box-shadow: none !important;
|
|
31
|
+
|
|
32
|
+
&:hover,
|
|
33
|
+
&:focus,
|
|
34
|
+
&:active {
|
|
35
|
+
background: transparent !important;
|
|
36
|
+
border-color: transparent !important;
|
|
37
|
+
box-shadow: none !important;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
// ========== 统计卡片区 ==========
|
|
24
42
|
.slp-statistics {
|
|
25
43
|
display: flex;
|
|
@@ -50,6 +50,8 @@ export interface StatisticsListPageProps<T = Record<string, unknown>> {
|
|
|
50
50
|
titleSuffix?: ReactNode;
|
|
51
51
|
/** 紧跟标题右侧的区域:标题的延伸/补充(如月份选择器、状态标签) */
|
|
52
52
|
titleExtra?: ReactNode;
|
|
53
|
+
/** 是否显示 titleExtra 前置分割线,标题后跟标签等强关联场景可设为 false | `true` */
|
|
54
|
+
showTitleExtraDivider?: boolean;
|
|
53
55
|
/** 标题栏最右侧的独立操作区:与标题解耦(如按钮组、描述+link) */
|
|
54
56
|
titleActions?: ReactNode;
|
|
55
57
|
/** 统计卡片区配置(不传则不渲染卡片区) */
|
|
@@ -33,7 +33,6 @@ import { useCompanyToken } from "../../theme/useCompanyToken";
|
|
|
33
33
|
import "./index.scss";
|
|
34
34
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
35
35
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
37
36
|
var Text = Typography.Text;
|
|
38
37
|
|
|
39
38
|
// Error Boundary:防止脏数据导致整页白屏
|
|
@@ -102,6 +101,8 @@ export var StatisticsListPage = function StatisticsListPage(props) {
|
|
|
102
101
|
title = _props$title === void 0 ? '统计列表' : _props$title,
|
|
103
102
|
titleSuffix = props.titleSuffix,
|
|
104
103
|
titleExtra = props.titleExtra,
|
|
104
|
+
_props$showTitleExtra = props.showTitleExtraDivider,
|
|
105
|
+
showTitleExtraDivider = _props$showTitleExtra === void 0 ? true : _props$showTitleExtra,
|
|
105
106
|
titleActions = props.titleActions,
|
|
106
107
|
statisticCards = props.statisticCards,
|
|
107
108
|
_props$searchPlacehol = props.searchPlaceholder,
|
|
@@ -385,16 +386,21 @@ export var StatisticsListPage = function StatisticsListPage(props) {
|
|
|
385
386
|
var handleColumnSettingsClick = useCallback(function () {
|
|
386
387
|
CompanyMessage.info('请在业务侧通过 columns 属性控制列显示/隐藏');
|
|
387
388
|
}, []);
|
|
389
|
+
|
|
390
|
+
// 标题右侧补充区域:优先 titleExtra,兼容旧 titleSuffix,按 showTitleExtraDivider 决定是否带前置分割线
|
|
391
|
+
var extraNode = titleExtra !== null && titleExtra !== void 0 ? titleExtra : titleSuffix;
|
|
392
|
+
var titleExtraNode = extraNode ? /*#__PURE__*/_jsxs("span", {
|
|
393
|
+
className: "slp-title-extra",
|
|
394
|
+
children: [showTitleExtraDivider && /*#__PURE__*/_jsx("span", {
|
|
395
|
+
className: "slp-divider"
|
|
396
|
+
}), extraNode]
|
|
397
|
+
}) : undefined;
|
|
388
398
|
return /*#__PURE__*/_jsx(StatisticsErrorBoundary, {
|
|
389
399
|
children: /*#__PURE__*/_jsxs("div", {
|
|
390
400
|
className: "statistics-list-page".concat(className ? " ".concat(className) : ''),
|
|
391
401
|
children: [/*#__PURE__*/_jsx(PageTitle, {
|
|
392
402
|
title: title,
|
|
393
|
-
titleExtra:
|
|
394
|
-
children: [/*#__PURE__*/_jsx("span", {
|
|
395
|
-
className: "slp-divider"
|
|
396
|
-
}), titleSuffix]
|
|
397
|
-
}) : undefined,
|
|
403
|
+
titleExtra: titleExtraNode,
|
|
398
404
|
actions: titleActions
|
|
399
405
|
}), statisticCards && statisticCards.length > 0 && /*#__PURE__*/_jsx("div", {
|
|
400
406
|
className: "slp-statistics",
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
padding: 0 calc(var(--spacing-sm, 12) * 1px);
|
|
7
7
|
background: #f5f5f5;
|
|
8
8
|
|
|
9
|
-
// 标题区右侧槽位布局(对齐
|
|
10
|
-
|
|
9
|
+
// 标题区右侧槽位布局(对齐 SmartListTemplate:分割线左右间距对称 16px)
|
|
10
|
+
// 注:PageTitle 内部 .page-title-left 已有 gap:8px,此处补 8px margin-left 凑齐 16px
|
|
11
|
+
.slp-title-extra {
|
|
11
12
|
display: flex;
|
|
12
13
|
align-items: center;
|
|
13
14
|
gap: calc(var(--spacing-md, 16) * 1px);
|
|
@@ -16,10 +17,27 @@
|
|
|
16
17
|
|
|
17
18
|
.slp-divider {
|
|
18
19
|
width: 1px;
|
|
19
|
-
height:
|
|
20
|
+
height: 16px;
|
|
20
21
|
background: var(--color-border, rgba(5, 5, 5, 0.15));
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
// 月份选择器触发按钮:伪装成纯文字,去掉按钮边距与 hover 背景
|
|
25
|
+
// 对齐 SmartListTemplate 的 .dropdown-text-btn 既定模式(antd Button 深度定制场景)
|
|
26
|
+
.slp-month-trigger.ant-btn {
|
|
27
|
+
padding-inline: 0 !important;
|
|
28
|
+
background: transparent !important;
|
|
29
|
+
border-color: transparent !important;
|
|
30
|
+
box-shadow: none !important;
|
|
31
|
+
|
|
32
|
+
&:hover,
|
|
33
|
+
&:focus,
|
|
34
|
+
&:active {
|
|
35
|
+
background: transparent !important;
|
|
36
|
+
border-color: transparent !important;
|
|
37
|
+
box-shadow: none !important;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
23
41
|
// ========== 统计卡片区 ==========
|
|
24
42
|
.slp-statistics {
|
|
25
43
|
display: flex;
|