@donglegeyu/company-ui 2.11.0 → 2.13.0
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/shared-components/PageTitleActions/index.d.ts +55 -0
- package/dist/cjs/shared-components/PageTitleActions/index.js +82 -0
- package/dist/cjs/shared-components/PageTitleActions/index.scss +20 -0
- package/dist/cjs/shared-components/index.d.ts +2 -0
- package/dist/cjs/shared-components/index.js +3 -0
- package/dist/cjs/template-components/SmartListTemplate/index.d.ts +10 -1
- package/dist/cjs/template-components/SmartListTemplate/index.js +32 -26
- package/dist/cjs/template-components/SmartListTemplate/index.scss +2 -48
- package/dist/cjs/template-components/StatisticsListPage/index.d.ts +2 -2
- package/dist/cjs/template-components/StatisticsListPage/index.js +4 -4
- package/dist/cjs/template-components/StatisticsListPage/index.scss +0 -15
- package/dist/cjs/template-components/TreeTableTemplate/index.js +2 -2
- package/dist/cjs/template-components/TreeTableTemplate/index.scss +4 -17
- package/dist/es/shared-components/PageTitleActions/index.d.ts +55 -0
- package/dist/es/shared-components/PageTitleActions/index.js +90 -0
- package/dist/es/shared-components/PageTitleActions/index.scss +20 -0
- package/dist/es/shared-components/index.d.ts +2 -0
- package/dist/es/shared-components/index.js +1 -0
- package/dist/es/template-components/SmartListTemplate/index.d.ts +10 -1
- package/dist/es/template-components/SmartListTemplate/index.js +16 -19
- package/dist/es/template-components/SmartListTemplate/index.scss +2 -48
- package/dist/es/template-components/StatisticsListPage/index.d.ts +2 -2
- package/dist/es/template-components/StatisticsListPage/index.js +5 -5
- package/dist/es/template-components/StatisticsListPage/index.scss +0 -15
- package/dist/es/template-components/TreeTableTemplate/index.js +3 -3
- package/dist/es/template-components/TreeTableTemplate/index.scss +4 -17
- package/package.json +2 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PageTitleActions —— 页面标题右侧操作区
|
|
3
|
+
*
|
|
4
|
+
* 将「描述文字 + 链接 + 按钮」这类高频组合收敛为组件:
|
|
5
|
+
* 描述文字三级文本色、链接主色均已内置,业务侧无需每次手写样式描述。
|
|
6
|
+
*/
|
|
7
|
+
import { type CSSProperties, type HTMLAttributeAnchorTarget, type MouseEvent, type ReactNode } from "react";
|
|
8
|
+
import "./index.scss";
|
|
9
|
+
/** 操作区里的描述文字(三级文本色,与标题形成视觉层级) */
|
|
10
|
+
export interface PageTitleActionTextProps {
|
|
11
|
+
/** 文字内容 */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** 自定义样式(默认三级文本色,可覆盖) */
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
/** 自定义类名 */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** 操作区里的链接(主色文字,区分于描述文字) */
|
|
19
|
+
export interface PageTitleActionLinkProps {
|
|
20
|
+
/** 链接文字 */
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
/** 跳转地址;不传则仅渲染文字(配合 onClick 做站内路由跳转) */
|
|
23
|
+
href?: string;
|
|
24
|
+
/** 打开方式(如新标签页 `_blank`) */
|
|
25
|
+
target?: HTMLAttributeAnchorTarget;
|
|
26
|
+
/** 点击回调(站内路由跳转时传) */
|
|
27
|
+
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
|
|
28
|
+
/** 自定义样式(默认主色,可覆盖) */
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
/** 自定义类名 */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface PageTitleActionsProps {
|
|
34
|
+
/** 操作区内容:PageTitleActions.Text / PageTitleActions.Link / CompanyButton 等任意节点 */
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
/** 自定义样式 */
|
|
37
|
+
style?: CSSProperties;
|
|
38
|
+
/** 自定义类名 */
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
/** 描述文字子组件:三级文本色 */
|
|
42
|
+
declare function ActionText({ children, style, className }: PageTitleActionTextProps): import("react").JSX.Element;
|
|
43
|
+
/** 链接子组件:主色文字;href + target 走外链(新标签页),仅 onClick 走站内路由 */
|
|
44
|
+
declare function ActionLink({ children, href, target, onClick, style, className, }: PageTitleActionLinkProps): import("react").JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* 页面标题右侧操作区。
|
|
47
|
+
* 裸字符串 / 数字子元素自动按描述文字样式(三级文本色)渲染,
|
|
48
|
+
* 免去每次手写 style 描述;Text / Link / 按钮等节点原样透出,不注入额外样式。
|
|
49
|
+
*/
|
|
50
|
+
declare function PageTitleActions({ children, style, className }: PageTitleActionsProps): import("react").JSX.Element;
|
|
51
|
+
declare const PageTitleActionsWithStatics: typeof PageTitleActions & {
|
|
52
|
+
Text: typeof ActionText;
|
|
53
|
+
Link: typeof ActionLink;
|
|
54
|
+
};
|
|
55
|
+
export default PageTitleActionsWithStatics;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/shared-components/PageTitleActions/index.tsx
|
|
20
|
+
var PageTitleActions_exports = {};
|
|
21
|
+
__export(PageTitleActions_exports, {
|
|
22
|
+
default: () => PageTitleActions_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(PageTitleActions_exports);
|
|
25
|
+
var import_index = require("./index.scss");
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
function ActionText({ children, style, className }) {
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `page-title-action-text${className ? ` ${className}` : ""}`, style, children });
|
|
29
|
+
}
|
|
30
|
+
function ActionLink({
|
|
31
|
+
children,
|
|
32
|
+
href,
|
|
33
|
+
target,
|
|
34
|
+
onClick,
|
|
35
|
+
style,
|
|
36
|
+
className
|
|
37
|
+
}) {
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
+
"a",
|
|
40
|
+
{
|
|
41
|
+
className: `page-title-action-link${className ? ` ${className}` : ""}`,
|
|
42
|
+
href,
|
|
43
|
+
target,
|
|
44
|
+
onClick,
|
|
45
|
+
style,
|
|
46
|
+
children
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function PageTitleActions({ children, style, className }) {
|
|
51
|
+
const childList = children === null || children === void 0 ? [] : Array.isArray(children) ? children : [children];
|
|
52
|
+
const items = [];
|
|
53
|
+
let textBuffer = [];
|
|
54
|
+
let wrappedCount = 0;
|
|
55
|
+
const flushText = () => {
|
|
56
|
+
if (textBuffer.length > 0) {
|
|
57
|
+
items.push(
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "page-title-action-text", children: textBuffer }, `text-${wrappedCount}`)
|
|
59
|
+
);
|
|
60
|
+
textBuffer = [];
|
|
61
|
+
wrappedCount += 1;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
childList.forEach((child) => {
|
|
65
|
+
if (child === null || child === void 0 || child === false || child === true) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
69
|
+
textBuffer.push(child);
|
|
70
|
+
} else {
|
|
71
|
+
flushText();
|
|
72
|
+
items.push(child);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
flushText();
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `page-title-actions-group${className ? ` ${className}` : ""}`, style, children: items });
|
|
77
|
+
}
|
|
78
|
+
var PageTitleActionsWithStatics = Object.assign(PageTitleActions, {
|
|
79
|
+
Text: ActionText,
|
|
80
|
+
Link: ActionLink
|
|
81
|
+
});
|
|
82
|
+
var PageTitleActions_default = PageTitleActionsWithStatics;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.page-title-actions-group {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.page-title-action-text {
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-weight: normal;
|
|
11
|
+
color: var(--color-text-tertiary);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.page-title-action-link {
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
color: var(--color-primary);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
@@ -2,6 +2,8 @@ export { default as SvgIcon } from "./SvgIcon";
|
|
|
2
2
|
export { default as ActionCell } from "./ActionCell";
|
|
3
3
|
export type { ActionButton } from "./ActionCell";
|
|
4
4
|
export { default as PageTitle } from "./PageTitle";
|
|
5
|
+
export { default as PageTitleActions } from "./PageTitleActions";
|
|
6
|
+
export type { PageTitleActionsProps, PageTitleActionTextProps, PageTitleActionLinkProps, } from "./PageTitleActions";
|
|
5
7
|
export { default as FormFooterActions } from "./FormFooterActions";
|
|
6
8
|
export { default as SectionTitle } from "./SectionTitle";
|
|
7
9
|
export { default as BaseInfoForm } from "./BaseInfoForm";
|
|
@@ -40,6 +40,7 @@ __export(shared_components_exports, {
|
|
|
40
40
|
IconGallery: () => import_IconGallery.default,
|
|
41
41
|
IconParkGallery: () => import_IconParkGallery.default,
|
|
42
42
|
PageTitle: () => import_PageTitle.default,
|
|
43
|
+
PageTitleActions: () => import_PageTitleActions.default,
|
|
43
44
|
SectionTitle: () => import_SectionTitle.default,
|
|
44
45
|
SvgIcon: () => import_SvgIcon.default,
|
|
45
46
|
ViewSwitcher: () => import_ViewSwitcher.default,
|
|
@@ -49,6 +50,7 @@ module.exports = __toCommonJS(shared_components_exports);
|
|
|
49
50
|
var import_SvgIcon = __toESM(require("./SvgIcon"));
|
|
50
51
|
var import_ActionCell = __toESM(require("./ActionCell"));
|
|
51
52
|
var import_PageTitle = __toESM(require("./PageTitle"));
|
|
53
|
+
var import_PageTitleActions = __toESM(require("./PageTitleActions"));
|
|
52
54
|
var import_FormFooterActions = __toESM(require("./FormFooterActions"));
|
|
53
55
|
var import_SectionTitle = __toESM(require("./SectionTitle"));
|
|
54
56
|
var import_BaseInfoForm = __toESM(require("./BaseInfoForm"));
|
|
@@ -74,6 +76,7 @@ var import_useIconPark = require("./IconParkGallery/useIconPark");
|
|
|
74
76
|
IconGallery,
|
|
75
77
|
IconParkGallery,
|
|
76
78
|
PageTitle,
|
|
79
|
+
PageTitleActions,
|
|
77
80
|
SectionTitle,
|
|
78
81
|
SvgIcon,
|
|
79
82
|
ViewSwitcher,
|
|
@@ -34,10 +34,19 @@ interface SmartListTemplateProps {
|
|
|
34
34
|
record: RecordType;
|
|
35
35
|
expandedRowKeys: string[];
|
|
36
36
|
}) => void;
|
|
37
|
+
/**
|
|
38
|
+
* 标题栏最右侧操作区(如帮助入口「快速上手」;内部映射到 `PageTitle.actions`,
|
|
39
|
+
* 与 `StatisticsListPage` 的 `titleActions` 行为一致,全家族统一只用本 prop)。
|
|
40
|
+
*/
|
|
37
41
|
titleActions?: ReactNode;
|
|
38
42
|
/** 紧跟标题右侧的区域:标题的延伸/补充(如状态标签、计数) */
|
|
39
43
|
titleExtra?: ReactNode;
|
|
40
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* 标题栏最右侧的独立操作区:与标题解耦(如按钮组、描述+link)
|
|
46
|
+
* (内部映射到 `PageTitle.actions`)。
|
|
47
|
+
* @deprecated 请直接使用 `titleActions`。本 prop 仅做兼容保留(与 `titleActions`
|
|
48
|
+
* 同渲染进 `PageTitle.actions`,`titleActions` 在左),下个大版本移除。
|
|
49
|
+
*/
|
|
41
50
|
titleRightActions?: ReactNode;
|
|
42
51
|
toolbarActions?: ReactNode;
|
|
43
52
|
toolbarRightActions?: ReactNode;
|
|
@@ -365,7 +365,7 @@ function SmartListTemplate({
|
|
|
365
365
|
}, [effectiveFilterParams, isRecordingBaseline, hasSearched, initializedFilterParams]);
|
|
366
366
|
const updateTableHeight = (0, import_react.useCallback)(() => {
|
|
367
367
|
var _a, _b, _c, _d, _e;
|
|
368
|
-
const header = ((_a = document.querySelector(".page-
|
|
368
|
+
const header = ((_a = document.querySelector(".smart-list-template .page-title")) == null ? void 0 : _a.clientHeight) || 0;
|
|
369
369
|
const filter = ((_b = document.querySelector(".filter-form")) == null ? void 0 : _b.clientHeight) || 0;
|
|
370
370
|
const toolbar = ((_c = document.querySelector(".toolbar")) == null ? void 0 : _c.clientHeight) || 0;
|
|
371
371
|
const paginationEl = ((_d = document.querySelector(".pagination")) == null ? void 0 : _d.clientHeight) || 56;
|
|
@@ -391,32 +391,38 @@ function SmartListTemplate({
|
|
|
391
391
|
showQuickJumper: true
|
|
392
392
|
};
|
|
393
393
|
}, [pagination, paginationConfig]);
|
|
394
|
+
const titleRightNode = titleActions || titleRightActions ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
395
|
+
titleActions,
|
|
396
|
+
titleRightActions
|
|
397
|
+
] }) : void 0;
|
|
394
398
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "smart-list-template", children: [
|
|
395
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
/* @__PURE__ */ (0, import_jsx_runtime.
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
399
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
400
|
+
import_shared_components.PageTitle,
|
|
401
|
+
{
|
|
402
|
+
title,
|
|
403
|
+
titleExtra: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "page-title-divider" }),
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
406
|
+
import_shared_components.ViewSwitcher,
|
|
407
|
+
{
|
|
408
|
+
viewEndpoint,
|
|
409
|
+
fields,
|
|
410
|
+
filterParams: effectiveFilterParams,
|
|
411
|
+
modified: hasModified,
|
|
412
|
+
searched: hasSearched,
|
|
413
|
+
onSchemeChange: handleViewSchemeChange,
|
|
414
|
+
onCurrentSchemeChange: setCurrentScheme,
|
|
415
|
+
onSchemesChange: setFilterSchemes,
|
|
416
|
+
onEditScheme: updateFilterParams,
|
|
417
|
+
onSaved: handleViewSaved,
|
|
418
|
+
onSaveAsOpen: handleViewSaveAsOpen
|
|
419
|
+
}
|
|
420
|
+
),
|
|
421
|
+
titleExtra
|
|
422
|
+
] }),
|
|
423
|
+
actions: titleRightNode
|
|
424
|
+
}
|
|
425
|
+
),
|
|
420
426
|
displayFilterItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
421
427
|
import_FilterForm.default,
|
|
422
428
|
{
|
|
@@ -9,55 +9,9 @@
|
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
box-sizing: border-box;
|
|
11
11
|
background: var(--color-bg-layout);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.page-header {
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
height: 48px;
|
|
18
|
-
padding: 0;
|
|
19
|
-
gap: 16px;
|
|
20
|
-
align-self: stretch;
|
|
21
|
-
z-index: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.page-title {
|
|
25
|
-
font-size: 16px;
|
|
26
|
-
font-weight: 600;
|
|
27
|
-
color: rgba(0, 0, 0, 0.88);
|
|
28
|
-
margin: 0;
|
|
29
|
-
line-height: 24px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.page-title-extra {
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: 4px;
|
|
36
|
-
font-size: 14px;
|
|
37
|
-
color: rgba(0, 0, 0, 0.65);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.page-header-actions {
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
gap: 12px;
|
|
44
|
-
margin-left: 0;
|
|
45
|
-
margin-right: 0;
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.page-header-right {
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
gap: 8px;
|
|
53
|
-
margin-left: auto;
|
|
54
|
-
flex-shrink: 0;
|
|
55
|
-
}
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
height: 16px;
|
|
60
|
-
background-color: var(--color-border);
|
|
13
|
+
// 标题右侧区域按组件库 PageTitle 原生插槽来,不自定义包装类:
|
|
14
|
+
// titleExtra 子节点由 .page-title-extra(flex+gap)排版,分割线复用 .page-title-divider,最右操作区由 .page-title-actions 排版
|
|
61
15
|
}
|
|
62
16
|
|
|
63
17
|
.filter-gap {
|
|
@@ -91,9 +91,9 @@ export interface StatisticsListPageProps<T = Record<string, unknown>> {
|
|
|
91
91
|
scrollY?: string | number;
|
|
92
92
|
/** 表格空状态文案 */
|
|
93
93
|
emptyText?: ReactNode;
|
|
94
|
-
/**
|
|
94
|
+
/** 业务按钮插槽:与内置「列设置/密度/刷新」同组,渲染在内置项左侧(搜索框/筛选仍在工具栏最左;命名保留历史,不限于左侧) */
|
|
95
95
|
toolbarLeftExtra?: ReactNode;
|
|
96
|
-
/**
|
|
96
|
+
/** 工具栏右侧轻控件插槽(业务按钮与内置图标之间,如状态切换单选框),不放业务按钮 */
|
|
97
97
|
toolbarRightExtra?: ReactNode;
|
|
98
98
|
/** 视图配置接口地址;传入后页面标题右侧显示视图切换器(带分割线,与 SmartListTemplate 一致) */
|
|
99
99
|
viewEndpoint?: string;
|
|
@@ -471,8 +471,8 @@ var StatisticsListPage = (props) => {
|
|
|
471
471
|
}
|
|
472
472
|
) : null;
|
|
473
473
|
const viewSwitcherNode = !viewSwitcher ? null : viewSwitcherPortalContainer === void 0 ? viewSwitcher : viewSwitcherPortalContainer ? (0, import_react_dom.createPortal)(viewSwitcher, viewSwitcherPortalContainer) : null;
|
|
474
|
-
const titleExtraNode = viewSwitcherNode || extraNode ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
475
|
-
showTitleExtraDivider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "
|
|
474
|
+
const titleExtraNode = viewSwitcherNode || extraNode ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
475
|
+
showTitleExtraDivider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "page-title-divider" }),
|
|
476
476
|
viewSwitcherNode,
|
|
477
477
|
extraNode
|
|
478
478
|
] }) : void 0;
|
|
@@ -518,10 +518,10 @@ var StatisticsListPage = (props) => {
|
|
|
518
518
|
filterTags.length > 0 && `(${filterTags.length})`
|
|
519
519
|
]
|
|
520
520
|
}
|
|
521
|
-
)
|
|
522
|
-
toolbarLeftExtra
|
|
521
|
+
)
|
|
523
522
|
] }),
|
|
524
523
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "slp-table-header-right", children: [
|
|
524
|
+
toolbarLeftExtra,
|
|
525
525
|
toolbarRightExtra,
|
|
526
526
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
527
527
|
import_ColumnSettingsPanel.default,
|
|
@@ -6,21 +6,6 @@
|
|
|
6
6
|
padding: 0 calc(var(--spacing-sm, 12) * 1px);
|
|
7
7
|
background: var(--color-bg-layout);
|
|
8
8
|
|
|
9
|
-
// 标题区右侧槽位布局(对齐 SmartListTemplate:分割线左右间距对称 16px)
|
|
10
|
-
// 注:PageTitle 内部 .page-title-left 已有 gap:8px,此处补 8px margin-left 凑齐 16px
|
|
11
|
-
.slp-title-extra {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
gap: calc(var(--spacing-md, 16) * 1px);
|
|
15
|
-
margin-left: calc(var(--spacing-xs, 8) * 1px);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.slp-divider {
|
|
19
|
-
width: 1px;
|
|
20
|
-
height: 16px;
|
|
21
|
-
background: var(--color-border, rgba(5, 5, 5, 0.15));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
9
|
// 月份选择器触发按钮:伪装成纯文字,去掉按钮边距与 hover 背景
|
|
25
10
|
// 对齐 SmartListTemplate 的 .dropdown-text-btn 既定模式(antd Button 深度定制场景)
|
|
26
11
|
.slp-month-trigger.ant-btn {
|
|
@@ -159,8 +159,8 @@ var TreeTableTemplate = (props) => {
|
|
|
159
159
|
import_shared_components.PageTitle,
|
|
160
160
|
{
|
|
161
161
|
title,
|
|
162
|
-
titleExtra: titleExtra || viewEndpoint ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
163
|
-
viewEndpoint && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "
|
|
162
|
+
titleExtra: titleExtra || viewEndpoint ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
163
|
+
viewEndpoint && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "page-title-divider" }),
|
|
164
164
|
viewEndpoint && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { ref: setViewSwitcherSlot, className: "ttt-view-switcher-slot" }),
|
|
165
165
|
titleExtra
|
|
166
166
|
] }) : void 0,
|
|
@@ -17,24 +17,11 @@
|
|
|
17
17
|
font-weight: normal;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
//
|
|
21
|
-
.
|
|
22
|
-
|
|
20
|
+
// StatisticsListPage 视图切换器的 portal 挂载位
|
|
21
|
+
// (标题区按 PageTitle 原生插槽排版:子节点由 .page-title-extra 排版,分割线复用 .page-title-divider)
|
|
22
|
+
.ttt-view-switcher-slot {
|
|
23
|
+
display: inline-flex;
|
|
23
24
|
align-items: center;
|
|
24
|
-
gap: calc(var(--spacing-md, 16) * 1px);
|
|
25
|
-
margin-left: calc(var(--spacing-xs, 8) * 1px);
|
|
26
|
-
|
|
27
|
-
.ttt-divider {
|
|
28
|
-
width: 1px;
|
|
29
|
-
height: 16px;
|
|
30
|
-
background: var(--color-border, rgba(5, 5, 5, 0.15));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// StatisticsListPage 视图切换器的 portal 挂载位
|
|
34
|
-
.ttt-view-switcher-slot {
|
|
35
|
-
display: inline-flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
}
|
|
38
25
|
}
|
|
39
26
|
|
|
40
27
|
&.ttt-dragging {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PageTitleActions —— 页面标题右侧操作区
|
|
3
|
+
*
|
|
4
|
+
* 将「描述文字 + 链接 + 按钮」这类高频组合收敛为组件:
|
|
5
|
+
* 描述文字三级文本色、链接主色均已内置,业务侧无需每次手写样式描述。
|
|
6
|
+
*/
|
|
7
|
+
import { type CSSProperties, type HTMLAttributeAnchorTarget, type MouseEvent, type ReactNode } from "react";
|
|
8
|
+
import "./index.scss";
|
|
9
|
+
/** 操作区里的描述文字(三级文本色,与标题形成视觉层级) */
|
|
10
|
+
export interface PageTitleActionTextProps {
|
|
11
|
+
/** 文字内容 */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** 自定义样式(默认三级文本色,可覆盖) */
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
/** 自定义类名 */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** 操作区里的链接(主色文字,区分于描述文字) */
|
|
19
|
+
export interface PageTitleActionLinkProps {
|
|
20
|
+
/** 链接文字 */
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
/** 跳转地址;不传则仅渲染文字(配合 onClick 做站内路由跳转) */
|
|
23
|
+
href?: string;
|
|
24
|
+
/** 打开方式(如新标签页 `_blank`) */
|
|
25
|
+
target?: HTMLAttributeAnchorTarget;
|
|
26
|
+
/** 点击回调(站内路由跳转时传) */
|
|
27
|
+
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
|
|
28
|
+
/** 自定义样式(默认主色,可覆盖) */
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
/** 自定义类名 */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface PageTitleActionsProps {
|
|
34
|
+
/** 操作区内容:PageTitleActions.Text / PageTitleActions.Link / CompanyButton 等任意节点 */
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
/** 自定义样式 */
|
|
37
|
+
style?: CSSProperties;
|
|
38
|
+
/** 自定义类名 */
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
/** 描述文字子组件:三级文本色 */
|
|
42
|
+
declare function ActionText({ children, style, className }: PageTitleActionTextProps): import("react").JSX.Element;
|
|
43
|
+
/** 链接子组件:主色文字;href + target 走外链(新标签页),仅 onClick 走站内路由 */
|
|
44
|
+
declare function ActionLink({ children, href, target, onClick, style, className, }: PageTitleActionLinkProps): import("react").JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* 页面标题右侧操作区。
|
|
47
|
+
* 裸字符串 / 数字子元素自动按描述文字样式(三级文本色)渲染,
|
|
48
|
+
* 免去每次手写 style 描述;Text / Link / 按钮等节点原样透出,不注入额外样式。
|
|
49
|
+
*/
|
|
50
|
+
declare function PageTitleActions({ children, style, className }: PageTitleActionsProps): import("react").JSX.Element;
|
|
51
|
+
declare const PageTitleActionsWithStatics: typeof PageTitleActions & {
|
|
52
|
+
Text: typeof ActionText;
|
|
53
|
+
Link: typeof ActionLink;
|
|
54
|
+
};
|
|
55
|
+
export default PageTitleActionsWithStatics;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PageTitleActions —— 页面标题右侧操作区
|
|
3
|
+
*
|
|
4
|
+
* 将「描述文字 + 链接 + 按钮」这类高频组合收敛为组件:
|
|
5
|
+
* 描述文字三级文本色、链接主色均已内置,业务侧无需每次手写样式描述。
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import "./index.scss";
|
|
9
|
+
|
|
10
|
+
/** 操作区里的描述文字(三级文本色,与标题形成视觉层级) */
|
|
11
|
+
|
|
12
|
+
/** 操作区里的链接(主色文字,区分于描述文字) */
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
/** 描述文字子组件:三级文本色 */
|
|
15
|
+
function ActionText(_ref) {
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
style = _ref.style,
|
|
18
|
+
className = _ref.className;
|
|
19
|
+
return /*#__PURE__*/_jsx("span", {
|
|
20
|
+
className: "page-title-action-text".concat(className ? " ".concat(className) : ""),
|
|
21
|
+
style: style,
|
|
22
|
+
children: children
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** 链接子组件:主色文字;href + target 走外链(新标签页),仅 onClick 走站内路由 */
|
|
27
|
+
function ActionLink(_ref2) {
|
|
28
|
+
var children = _ref2.children,
|
|
29
|
+
href = _ref2.href,
|
|
30
|
+
target = _ref2.target,
|
|
31
|
+
onClick = _ref2.onClick,
|
|
32
|
+
style = _ref2.style,
|
|
33
|
+
className = _ref2.className;
|
|
34
|
+
return /*#__PURE__*/_jsx("a", {
|
|
35
|
+
className: "page-title-action-link".concat(className ? " ".concat(className) : ""),
|
|
36
|
+
href: href,
|
|
37
|
+
target: target,
|
|
38
|
+
onClick: onClick,
|
|
39
|
+
style: style,
|
|
40
|
+
children: children
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 页面标题右侧操作区。
|
|
46
|
+
* 裸字符串 / 数字子元素自动按描述文字样式(三级文本色)渲染,
|
|
47
|
+
* 免去每次手写 style 描述;Text / Link / 按钮等节点原样透出,不注入额外样式。
|
|
48
|
+
*/
|
|
49
|
+
function PageTitleActions(_ref3) {
|
|
50
|
+
var children = _ref3.children,
|
|
51
|
+
style = _ref3.style,
|
|
52
|
+
className = _ref3.className;
|
|
53
|
+
var childList = children === null || children === undefined ? [] : Array.isArray(children) ? children : [children];
|
|
54
|
+
var items = [];
|
|
55
|
+
var textBuffer = [];
|
|
56
|
+
var wrappedCount = 0;
|
|
57
|
+
var flushText = function flushText() {
|
|
58
|
+
if (textBuffer.length > 0) {
|
|
59
|
+
items.push( /*#__PURE__*/_jsx("span", {
|
|
60
|
+
className: "page-title-action-text",
|
|
61
|
+
children: textBuffer
|
|
62
|
+
}, "text-".concat(wrappedCount)));
|
|
63
|
+
textBuffer = [];
|
|
64
|
+
wrappedCount += 1;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
childList.forEach(function (child) {
|
|
68
|
+
// 空节点跳过;裸字符串/数字兜底按描述文字渲染;其余节点(Text/Link/按钮等)原样透出
|
|
69
|
+
if (child === null || child === undefined || child === false || child === true) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
73
|
+
textBuffer.push(child);
|
|
74
|
+
} else {
|
|
75
|
+
flushText();
|
|
76
|
+
items.push(child);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
flushText();
|
|
80
|
+
return /*#__PURE__*/_jsx("div", {
|
|
81
|
+
className: "page-title-actions-group".concat(className ? " ".concat(className) : ""),
|
|
82
|
+
style: style,
|
|
83
|
+
children: items
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
var PageTitleActionsWithStatics = Object.assign(PageTitleActions, {
|
|
87
|
+
Text: ActionText,
|
|
88
|
+
Link: ActionLink
|
|
89
|
+
});
|
|
90
|
+
export default PageTitleActionsWithStatics;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.page-title-actions-group {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.page-title-action-text {
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
font-weight: normal;
|
|
11
|
+
color: var(--color-text-tertiary);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.page-title-action-link {
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
color: var(--color-primary);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
}
|
|
@@ -2,6 +2,8 @@ export { default as SvgIcon } from "./SvgIcon";
|
|
|
2
2
|
export { default as ActionCell } from "./ActionCell";
|
|
3
3
|
export type { ActionButton } from "./ActionCell";
|
|
4
4
|
export { default as PageTitle } from "./PageTitle";
|
|
5
|
+
export { default as PageTitleActions } from "./PageTitleActions";
|
|
6
|
+
export type { PageTitleActionsProps, PageTitleActionTextProps, PageTitleActionLinkProps, } from "./PageTitleActions";
|
|
5
7
|
export { default as FormFooterActions } from "./FormFooterActions";
|
|
6
8
|
export { default as SectionTitle } from "./SectionTitle";
|
|
7
9
|
export { default as BaseInfoForm } from "./BaseInfoForm";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as SvgIcon } from "./SvgIcon";
|
|
2
2
|
export { default as ActionCell } from "./ActionCell";
|
|
3
3
|
export { default as PageTitle } from "./PageTitle";
|
|
4
|
+
export { default as PageTitleActions } from "./PageTitleActions";
|
|
4
5
|
export { default as FormFooterActions } from "./FormFooterActions";
|
|
5
6
|
export { default as SectionTitle } from "./SectionTitle";
|
|
6
7
|
export { default as BaseInfoForm } from "./BaseInfoForm";
|
|
@@ -34,10 +34,19 @@ interface SmartListTemplateProps {
|
|
|
34
34
|
record: RecordType;
|
|
35
35
|
expandedRowKeys: string[];
|
|
36
36
|
}) => void;
|
|
37
|
+
/**
|
|
38
|
+
* 标题栏最右侧操作区(如帮助入口「快速上手」;内部映射到 `PageTitle.actions`,
|
|
39
|
+
* 与 `StatisticsListPage` 的 `titleActions` 行为一致,全家族统一只用本 prop)。
|
|
40
|
+
*/
|
|
37
41
|
titleActions?: ReactNode;
|
|
38
42
|
/** 紧跟标题右侧的区域:标题的延伸/补充(如状态标签、计数) */
|
|
39
43
|
titleExtra?: ReactNode;
|
|
40
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* 标题栏最右侧的独立操作区:与标题解耦(如按钮组、描述+link)
|
|
46
|
+
* (内部映射到 `PageTitle.actions`)。
|
|
47
|
+
* @deprecated 请直接使用 `titleActions`。本 prop 仅做兼容保留(与 `titleActions`
|
|
48
|
+
* 同渲染进 `PageTitle.actions`,`titleActions` 在左),下个大版本移除。
|
|
49
|
+
*/
|
|
41
50
|
titleRightActions?: ReactNode;
|
|
42
51
|
toolbarActions?: ReactNode;
|
|
43
52
|
toolbarRightActions?: ReactNode;
|
|
@@ -19,11 +19,12 @@ import { CompanyTable, CompanyButton, CompanyPagination, CompanyDropdown, Compan
|
|
|
19
19
|
import { ConfigProvider } from "antd";
|
|
20
20
|
import zhCN from "antd/locale/zh_CN";
|
|
21
21
|
import FilterForm from "../FilterForm";
|
|
22
|
-
import { SvgIcon, EllipsisText, ViewSwitcher } from "../../shared-components";
|
|
22
|
+
import { SvgIcon, EllipsisText, ViewSwitcher, PageTitle } from "../../shared-components";
|
|
23
23
|
import { createActionColumn, DENSITY_CELL_PADDING, TABLE_CELL_INLINE_PADDING } from "../../shared-components/tableActionColumn";
|
|
24
24
|
import ColumnSettingsPanel from "../ColumnSettingsPanel";
|
|
25
25
|
import "./index.scss";
|
|
26
26
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
27
28
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
29
|
var nonBusinessFields = ["action", "index", "checkbox", "selection"];
|
|
29
30
|
|
|
@@ -425,7 +426,7 @@ export default function SmartListTemplate(_ref) {
|
|
|
425
426
|
}, [effectiveFilterParams, isRecordingBaseline, hasSearched, initializedFilterParams]);
|
|
426
427
|
var updateTableHeight = useCallback(function () {
|
|
427
428
|
var _document$querySelect, _document$querySelect2, _document$querySelect3, _document$querySelect4, _document$querySelect5;
|
|
428
|
-
var header = ((_document$querySelect = document.querySelector(".page-
|
|
429
|
+
var header = ((_document$querySelect = document.querySelector(".smart-list-template .page-title")) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.clientHeight) || 0;
|
|
429
430
|
var filter = ((_document$querySelect2 = document.querySelector(".filter-form")) === null || _document$querySelect2 === void 0 ? void 0 : _document$querySelect2.clientHeight) || 0;
|
|
430
431
|
var toolbar = ((_document$querySelect3 = document.querySelector(".toolbar")) === null || _document$querySelect3 === void 0 ? void 0 : _document$querySelect3.clientHeight) || 0;
|
|
431
432
|
var paginationEl = ((_document$querySelect4 = document.querySelector(".pagination")) === null || _document$querySelect4 === void 0 ? void 0 : _document$querySelect4.clientHeight) || 56;
|
|
@@ -455,20 +456,18 @@ export default function SmartListTemplate(_ref) {
|
|
|
455
456
|
showQuickJumper: true
|
|
456
457
|
});
|
|
457
458
|
}, [pagination, paginationConfig]);
|
|
459
|
+
|
|
460
|
+
// 标题栏右侧统一进 PageTitle.actions;titleRightActions 已废弃,兼容保留(titleActions 在左)
|
|
461
|
+
var titleRightNode = titleActions || titleRightActions ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
462
|
+
children: [titleActions, titleRightActions]
|
|
463
|
+
}) : undefined;
|
|
458
464
|
return /*#__PURE__*/_jsxs("div", {
|
|
459
465
|
className: "smart-list-template",
|
|
460
|
-
children: [/*#__PURE__*/
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
}), titleExtra && /*#__PURE__*/_jsx("div", {
|
|
466
|
-
className: "page-title-extra",
|
|
467
|
-
children: titleExtra
|
|
468
|
-
}), /*#__PURE__*/_jsxs("div", {
|
|
469
|
-
className: "page-header-actions",
|
|
470
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
471
|
-
className: "page-header-line"
|
|
466
|
+
children: [/*#__PURE__*/_jsx(PageTitle, {
|
|
467
|
+
title: title,
|
|
468
|
+
titleExtra: /*#__PURE__*/_jsxs(_Fragment, {
|
|
469
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
470
|
+
className: "page-title-divider"
|
|
472
471
|
}), /*#__PURE__*/_jsx(ViewSwitcher, {
|
|
473
472
|
viewEndpoint: viewEndpoint,
|
|
474
473
|
fields: fields,
|
|
@@ -481,11 +480,9 @@ export default function SmartListTemplate(_ref) {
|
|
|
481
480
|
onEditScheme: updateFilterParams,
|
|
482
481
|
onSaved: handleViewSaved,
|
|
483
482
|
onSaveAsOpen: handleViewSaveAsOpen
|
|
484
|
-
}),
|
|
485
|
-
}),
|
|
486
|
-
|
|
487
|
-
children: titleRightActions
|
|
488
|
-
})]
|
|
483
|
+
}), titleExtra]
|
|
484
|
+
}),
|
|
485
|
+
actions: titleRightNode
|
|
489
486
|
}), displayFilterItems.length > 0 && /*#__PURE__*/_jsx(FilterForm, {
|
|
490
487
|
modelValue: effectiveFilterParams,
|
|
491
488
|
items: displayFilterItems,
|
|
@@ -9,55 +9,9 @@
|
|
|
9
9
|
overflow: hidden;
|
|
10
10
|
box-sizing: border-box;
|
|
11
11
|
background: var(--color-bg-layout);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.page-header {
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
height: 48px;
|
|
18
|
-
padding: 0;
|
|
19
|
-
gap: 16px;
|
|
20
|
-
align-self: stretch;
|
|
21
|
-
z-index: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.page-title {
|
|
25
|
-
font-size: 16px;
|
|
26
|
-
font-weight: 600;
|
|
27
|
-
color: rgba(0, 0, 0, 0.88);
|
|
28
|
-
margin: 0;
|
|
29
|
-
line-height: 24px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.page-title-extra {
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: 4px;
|
|
36
|
-
font-size: 14px;
|
|
37
|
-
color: rgba(0, 0, 0, 0.65);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.page-header-actions {
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
gap: 12px;
|
|
44
|
-
margin-left: 0;
|
|
45
|
-
margin-right: 0;
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.page-header-right {
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
gap: 8px;
|
|
53
|
-
margin-left: auto;
|
|
54
|
-
flex-shrink: 0;
|
|
55
|
-
}
|
|
56
12
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
height: 16px;
|
|
60
|
-
background-color: var(--color-border);
|
|
13
|
+
// 标题右侧区域按组件库 PageTitle 原生插槽来,不自定义包装类:
|
|
14
|
+
// titleExtra 子节点由 .page-title-extra(flex+gap)排版,分割线复用 .page-title-divider,最右操作区由 .page-title-actions 排版
|
|
61
15
|
}
|
|
62
16
|
|
|
63
17
|
.filter-gap {
|
|
@@ -91,9 +91,9 @@ export interface StatisticsListPageProps<T = Record<string, unknown>> {
|
|
|
91
91
|
scrollY?: string | number;
|
|
92
92
|
/** 表格空状态文案 */
|
|
93
93
|
emptyText?: ReactNode;
|
|
94
|
-
/**
|
|
94
|
+
/** 业务按钮插槽:与内置「列设置/密度/刷新」同组,渲染在内置项左侧(搜索框/筛选仍在工具栏最左;命名保留历史,不限于左侧) */
|
|
95
95
|
toolbarLeftExtra?: ReactNode;
|
|
96
|
-
/**
|
|
96
|
+
/** 工具栏右侧轻控件插槽(业务按钮与内置图标之间,如状态切换单选框),不放业务按钮 */
|
|
97
97
|
toolbarRightExtra?: ReactNode;
|
|
98
98
|
/** 视图配置接口地址;传入后页面标题右侧显示视图切换器(带分割线,与 SmartListTemplate 一致) */
|
|
99
99
|
viewEndpoint?: string;
|
|
@@ -36,6 +36,7 @@ import { createPortal } from "react-dom";
|
|
|
36
36
|
import "./index.scss";
|
|
37
37
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
38
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
39
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
39
40
|
var Text = Typography.Text;
|
|
40
41
|
|
|
41
42
|
// Error Boundary:防止脏数据导致整页白屏
|
|
@@ -666,10 +667,9 @@ export var StatisticsListPage = function StatisticsListPage(props) {
|
|
|
666
667
|
// portal 提升:外部模板统一渲染标题栏时(viewSwitcherPortalContainer 非 undefined)渲染到指定容器;
|
|
667
668
|
// 容器未就绪(null)前暂不渲染,避免闪现后重挂;undefined 表示未启用提升,原地渲染在自带标题栏
|
|
668
669
|
var viewSwitcherNode = !viewSwitcher ? null : viewSwitcherPortalContainer === undefined ? viewSwitcher : viewSwitcherPortalContainer ? /*#__PURE__*/createPortal(viewSwitcher, viewSwitcherPortalContainer) : null;
|
|
669
|
-
var titleExtraNode = viewSwitcherNode || extraNode ? /*#__PURE__*/_jsxs(
|
|
670
|
-
className: "slp-title-extra",
|
|
670
|
+
var titleExtraNode = viewSwitcherNode || extraNode ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
671
671
|
children: [showTitleExtraDivider && /*#__PURE__*/_jsx("span", {
|
|
672
|
-
className: "
|
|
672
|
+
className: "page-title-divider"
|
|
673
673
|
}), viewSwitcherNode, extraNode]
|
|
674
674
|
}) : undefined;
|
|
675
675
|
return /*#__PURE__*/_jsx(StatisticsErrorBoundary, {
|
|
@@ -724,10 +724,10 @@ export var StatisticsListPage = function StatisticsListPage(props) {
|
|
|
724
724
|
className: filterTags.length > 0 ? "slp-filter-btn slp-filter-btn-active" : "slp-filter-btn",
|
|
725
725
|
onClick: openFilterDrawer,
|
|
726
726
|
children: ["\u7B5B\u9009", filterTags.length > 0 && "(".concat(filterTags.length, ")")]
|
|
727
|
-
})
|
|
727
|
+
})]
|
|
728
728
|
}), /*#__PURE__*/_jsxs("div", {
|
|
729
729
|
className: "slp-table-header-right",
|
|
730
|
-
children: [toolbarRightExtra, /*#__PURE__*/_jsx(ColumnSettingsPanel, {
|
|
730
|
+
children: [toolbarLeftExtra, toolbarRightExtra, /*#__PURE__*/_jsx(ColumnSettingsPanel, {
|
|
731
731
|
fields: columnFields,
|
|
732
732
|
defaultFields: defaultColumnFields,
|
|
733
733
|
onConfirm: handleColumnSettingsConfirm,
|
|
@@ -6,21 +6,6 @@
|
|
|
6
6
|
padding: 0 calc(var(--spacing-sm, 12) * 1px);
|
|
7
7
|
background: var(--color-bg-layout);
|
|
8
8
|
|
|
9
|
-
// 标题区右侧槽位布局(对齐 SmartListTemplate:分割线左右间距对称 16px)
|
|
10
|
-
// 注:PageTitle 内部 .page-title-left 已有 gap:8px,此处补 8px margin-left 凑齐 16px
|
|
11
|
-
.slp-title-extra {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
gap: calc(var(--spacing-md, 16) * 1px);
|
|
15
|
-
margin-left: calc(var(--spacing-xs, 8) * 1px);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.slp-divider {
|
|
19
|
-
width: 1px;
|
|
20
|
-
height: 16px;
|
|
21
|
-
background: var(--color-border, rgba(5, 5, 5, 0.15));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
9
|
// 月份选择器触发按钮:伪装成纯文字,去掉按钮边距与 hover 背景
|
|
25
10
|
// 对齐 SmartListTemplate 的 .dropdown-text-btn 既定模式(antd Button 深度定制场景)
|
|
26
11
|
.slp-month-trigger.ant-btn {
|
|
@@ -31,6 +31,7 @@ import "./index.scss";
|
|
|
31
31
|
|
|
32
32
|
/** 组件内部组装产物,结构对齐 antd TreeDataNode */
|
|
33
33
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
34
35
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
36
|
/** 收集树全部节点 key(受控展开 / 搜索展开用) */
|
|
36
37
|
function collectAllKeys(nodes) {
|
|
@@ -205,10 +206,9 @@ export var TreeTableTemplate = function TreeTableTemplate(props) {
|
|
|
205
206
|
style: style,
|
|
206
207
|
children: [/*#__PURE__*/_jsx(PageTitle, {
|
|
207
208
|
title: title,
|
|
208
|
-
titleExtra: titleExtra || viewEndpoint ? /*#__PURE__*/_jsxs(
|
|
209
|
-
className: "ttt-title-extra",
|
|
209
|
+
titleExtra: titleExtra || viewEndpoint ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
210
210
|
children: [viewEndpoint && /*#__PURE__*/_jsx("span", {
|
|
211
|
-
className: "
|
|
211
|
+
className: "page-title-divider"
|
|
212
212
|
}), viewEndpoint && /*#__PURE__*/_jsx("span", {
|
|
213
213
|
ref: setViewSwitcherSlot,
|
|
214
214
|
className: "ttt-view-switcher-slot"
|
|
@@ -17,24 +17,11 @@
|
|
|
17
17
|
font-weight: normal;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
//
|
|
21
|
-
.
|
|
22
|
-
|
|
20
|
+
// StatisticsListPage 视图切换器的 portal 挂载位
|
|
21
|
+
// (标题区按 PageTitle 原生插槽排版:子节点由 .page-title-extra 排版,分割线复用 .page-title-divider)
|
|
22
|
+
.ttt-view-switcher-slot {
|
|
23
|
+
display: inline-flex;
|
|
23
24
|
align-items: center;
|
|
24
|
-
gap: calc(var(--spacing-md, 16) * 1px);
|
|
25
|
-
margin-left: calc(var(--spacing-xs, 8) * 1px);
|
|
26
|
-
|
|
27
|
-
.ttt-divider {
|
|
28
|
-
width: 1px;
|
|
29
|
-
height: 16px;
|
|
30
|
-
background: var(--color-border, rgba(5, 5, 5, 0.15));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// StatisticsListPage 视图切换器的 portal 挂载位
|
|
34
|
-
.ttt-view-switcher-slot {
|
|
35
|
-
display: inline-flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
}
|
|
38
25
|
}
|
|
39
26
|
|
|
40
27
|
&.ttt-dragging {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donglegeyu/company-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/es/index.js",
|
|
6
6
|
"types": "dist/es/index.d.ts",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"postpublish": "node scripts/postpublish.mjs",
|
|
41
41
|
"release:patch": "npm version patch && npm publish",
|
|
42
42
|
"verify:no-danger-delete": "node scripts/verify-no-danger-delete.mjs",
|
|
43
|
-
"verify:skill-examples": "node scripts/verify-skill-examples.mjs && node scripts/verify-no-danger-delete.mjs"
|
|
43
|
+
"verify:skill-examples": "node scripts/verify-llms-coverage.mjs && node scripts/verify-skill-examples.mjs && node scripts/verify-skill-facts.mjs && node scripts/verify-no-danger-delete.mjs"
|
|
44
44
|
},
|
|
45
45
|
"keywords": [
|
|
46
46
|
"antd",
|