@qq1948037137/adminsmart-ui 0.1.31 → 0.1.33
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/README.md +12 -0
- package/dist/index.cjs +126 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -4
- package/dist/index.d.ts +31 -4
- package/dist/index.js +148 -30
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/styles/composites.css +11 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as antd from 'antd';
|
|
2
|
+
import { Button as Button$1, ButtonProps, TooltipProps, ConfigProvider as ConfigProvider$1, Drawer as Drawer$1, Form as Form$1, Input as Input$1, Modal as Modal$1, Select as Select$1, TableProps as TableProps$1, Table as Table$1, Typography as Typography$1, AutoComplete as AutoComplete$1, Checkbox as Checkbox$1, DatePicker as DatePicker$1, InputNumber as InputNumber$1, Radio as Radio$1, Slider as Slider$1, Switch as Switch$1, TreeSelect as TreeSelect$1, Upload as Upload$1, Alert as Alert$1, App as App$1, Empty as Empty$1, Progress as Progress$1, Result as Result$1, Spin as Spin$1, Statistic as Statistic$1, Tag as Tag$1, Timeline as Timeline$1, Card as Card$1, Descriptions as Descriptions$1, List as List$1, Pagination as Pagination$1, Tree as Tree$1, Avatar as Avatar$1, Col as Col$1, Flex as Flex$1, Layout as Layout$1, Row as Row$1, Space as Space$1, Dropdown as Dropdown$1, Menu as Menu$1, Tabs as Tabs$1, Popover as Popover$1, Tooltip as Tooltip$1, Affix as Affix$1, Anchor as Anchor$1, BackTop as BackTop$1, Badge as Badge$1, BorderBeam as BorderBeam$1, Breadcrumb as Breadcrumb$1, Calendar as Calendar$1, Carousel as Carousel$1, Cascader as Cascader$1, Collapse as Collapse$1, ColorPicker as ColorPicker$1, Divider as Divider$1, FloatButton as FloatButton$1, Grid as Grid$1, Image as Image$1, Listy as Listy$1, Masonry as Masonry$1, Mentions as Mentions$1, Popconfirm as Popconfirm$1, QRCode as QRCode$1, Rate as Rate$1, Segmented as Segmented$1, Skeleton as Skeleton$1, Splitter as Splitter$1, Steps as Steps$1, TimePicker as TimePicker$1, Tour as Tour$1, Transfer as Transfer$1, Watermark as Watermark$1, DrawerProps, FormProps, FormInstance } from 'antd';
|
|
2
3
|
export { theme } from 'antd';
|
|
3
4
|
import * as react from 'react';
|
|
4
|
-
import { RefAttributes,
|
|
5
|
+
import { ReactNode, PropsWithChildren, RefAttributes, ComponentRef, CSSProperties, HTMLAttributes, ReactElement, ComponentProps, Ref } from 'react';
|
|
5
6
|
import { Replayer } from '@rrweb/replay';
|
|
6
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
8
|
|
|
@@ -55,7 +56,31 @@ declare const Modal: typeof Modal$1;
|
|
|
55
56
|
/** Select 的泛型值类型、搜索回调及虚拟列表行为全部沿用 Ant 原生接口。 */
|
|
56
57
|
declare const Select: typeof Select$1;
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
interface TableRowNumberConfig {
|
|
60
|
+
/** 外置分页的当前页,从 1 开始;内置分页会自动传入页码。 */
|
|
61
|
+
current?: number;
|
|
62
|
+
/** 外置分页每页请求条数;内置分页会自动传入实际页大小。 */
|
|
63
|
+
pageSize?: number;
|
|
64
|
+
/** 居中序号列的列头,省略时显示“序号”。 */
|
|
65
|
+
title?: ReactNode;
|
|
66
|
+
/** 序号列宽度,单位为 CSS 像素。 */
|
|
67
|
+
width?: number;
|
|
68
|
+
}
|
|
69
|
+
interface TableProps<RecordType extends object = Record<string, unknown>> extends TableProps$1<RecordType> {
|
|
70
|
+
/** 默认添加首条业务序号列;false 可关闭,外置分页也可传页码和大小。 */
|
|
71
|
+
rowNumber?: boolean | TableRowNumberConfig;
|
|
72
|
+
}
|
|
73
|
+
type TableRef = ComponentRef<typeof Table$1>;
|
|
74
|
+
/**
|
|
75
|
+
* 按页内位置显示普通序号,借助 Ant 的原生列渲染和分页事件保留现有功能。
|
|
76
|
+
* @param props 原生 Table 参数及组件库自动序号设置;ref 直接交给原始 Ant 表格。
|
|
77
|
+
* @returns 使用原始记录、选择和滚动配置的 Ant Table。
|
|
78
|
+
*/
|
|
79
|
+
declare function NumberedTable<RecordType extends object>({ rowNumber, pagination, columns, children, dataSource, expandable, expandIconColumnIndex, onChange, scroll, ...props }: PropsWithChildren<TableProps<RecordType>> & RefAttributes<TableRef>): react.FunctionComponentElement<TableProps$1<RecordType> & {
|
|
80
|
+
children?: ReactNode | undefined;
|
|
81
|
+
} & RefAttributes<antd.TableRef>>;
|
|
82
|
+
type NumberedTableComponent = typeof NumberedTable & typeof Table$1;
|
|
83
|
+
declare const Table: NumberedTableComponent;
|
|
59
84
|
|
|
60
85
|
declare const Typography: typeof Typography$1;
|
|
61
86
|
|
|
@@ -243,6 +268,8 @@ interface SessionReplayProps {
|
|
|
243
268
|
endOffsetMs?: number;
|
|
244
269
|
/** 官方快照恢复后自动播放;默认 false,便于观看短片段。 */
|
|
245
270
|
autoPlay?: boolean;
|
|
271
|
+
/** 默认关闭;启用后播放 rrweb 已采集的连续鼠标轨迹。 */
|
|
272
|
+
mouseTrail?: boolean;
|
|
246
273
|
/** 纯可见时间标记,不读取或解析业务对象。 */
|
|
247
274
|
markers?: readonly SessionReplayMarker[];
|
|
248
275
|
/** 控制栏上方的简短提示、图例或额外操作。 */
|
|
@@ -611,4 +638,4 @@ declare function mapSchemaField(field: SchemaField): SchemaFieldMapping;
|
|
|
611
638
|
/** 从字段默认值生成表单初值;调用方的 initialValues 可在渲染层覆盖。 */
|
|
612
639
|
declare function schemaInitialValues(schema: SchemaFormSchema): SchemaFormValues;
|
|
613
640
|
|
|
614
|
-
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, CrudWorkspace, type CrudWorkspaceProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, ErrorReportButton, type ErrorReportButtonProps, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, OperationToolbar, type OperationToolbarProps, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, ReportErrorProvider, type ReportErrorProviderProps, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
|
|
641
|
+
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, CrudWorkspace, type CrudWorkspaceProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, ErrorReportButton, type ErrorReportButtonProps, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, OperationToolbar, type OperationToolbarProps, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, ReportErrorProvider, type ReportErrorProviderProps, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, type TableProps, type TableRowNumberConfig, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as antd from 'antd';
|
|
2
|
+
import { Button as Button$1, ButtonProps, TooltipProps, ConfigProvider as ConfigProvider$1, Drawer as Drawer$1, Form as Form$1, Input as Input$1, Modal as Modal$1, Select as Select$1, TableProps as TableProps$1, Table as Table$1, Typography as Typography$1, AutoComplete as AutoComplete$1, Checkbox as Checkbox$1, DatePicker as DatePicker$1, InputNumber as InputNumber$1, Radio as Radio$1, Slider as Slider$1, Switch as Switch$1, TreeSelect as TreeSelect$1, Upload as Upload$1, Alert as Alert$1, App as App$1, Empty as Empty$1, Progress as Progress$1, Result as Result$1, Spin as Spin$1, Statistic as Statistic$1, Tag as Tag$1, Timeline as Timeline$1, Card as Card$1, Descriptions as Descriptions$1, List as List$1, Pagination as Pagination$1, Tree as Tree$1, Avatar as Avatar$1, Col as Col$1, Flex as Flex$1, Layout as Layout$1, Row as Row$1, Space as Space$1, Dropdown as Dropdown$1, Menu as Menu$1, Tabs as Tabs$1, Popover as Popover$1, Tooltip as Tooltip$1, Affix as Affix$1, Anchor as Anchor$1, BackTop as BackTop$1, Badge as Badge$1, BorderBeam as BorderBeam$1, Breadcrumb as Breadcrumb$1, Calendar as Calendar$1, Carousel as Carousel$1, Cascader as Cascader$1, Collapse as Collapse$1, ColorPicker as ColorPicker$1, Divider as Divider$1, FloatButton as FloatButton$1, Grid as Grid$1, Image as Image$1, Listy as Listy$1, Masonry as Masonry$1, Mentions as Mentions$1, Popconfirm as Popconfirm$1, QRCode as QRCode$1, Rate as Rate$1, Segmented as Segmented$1, Skeleton as Skeleton$1, Splitter as Splitter$1, Steps as Steps$1, TimePicker as TimePicker$1, Tour as Tour$1, Transfer as Transfer$1, Watermark as Watermark$1, DrawerProps, FormProps, FormInstance } from 'antd';
|
|
2
3
|
export { theme } from 'antd';
|
|
3
4
|
import * as react from 'react';
|
|
4
|
-
import { RefAttributes,
|
|
5
|
+
import { ReactNode, PropsWithChildren, RefAttributes, ComponentRef, CSSProperties, HTMLAttributes, ReactElement, ComponentProps, Ref } from 'react';
|
|
5
6
|
import { Replayer } from '@rrweb/replay';
|
|
6
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
8
|
|
|
@@ -55,7 +56,31 @@ declare const Modal: typeof Modal$1;
|
|
|
55
56
|
/** Select 的泛型值类型、搜索回调及虚拟列表行为全部沿用 Ant 原生接口。 */
|
|
56
57
|
declare const Select: typeof Select$1;
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
interface TableRowNumberConfig {
|
|
60
|
+
/** 外置分页的当前页,从 1 开始;内置分页会自动传入页码。 */
|
|
61
|
+
current?: number;
|
|
62
|
+
/** 外置分页每页请求条数;内置分页会自动传入实际页大小。 */
|
|
63
|
+
pageSize?: number;
|
|
64
|
+
/** 居中序号列的列头,省略时显示“序号”。 */
|
|
65
|
+
title?: ReactNode;
|
|
66
|
+
/** 序号列宽度,单位为 CSS 像素。 */
|
|
67
|
+
width?: number;
|
|
68
|
+
}
|
|
69
|
+
interface TableProps<RecordType extends object = Record<string, unknown>> extends TableProps$1<RecordType> {
|
|
70
|
+
/** 默认添加首条业务序号列;false 可关闭,外置分页也可传页码和大小。 */
|
|
71
|
+
rowNumber?: boolean | TableRowNumberConfig;
|
|
72
|
+
}
|
|
73
|
+
type TableRef = ComponentRef<typeof Table$1>;
|
|
74
|
+
/**
|
|
75
|
+
* 按页内位置显示普通序号,借助 Ant 的原生列渲染和分页事件保留现有功能。
|
|
76
|
+
* @param props 原生 Table 参数及组件库自动序号设置;ref 直接交给原始 Ant 表格。
|
|
77
|
+
* @returns 使用原始记录、选择和滚动配置的 Ant Table。
|
|
78
|
+
*/
|
|
79
|
+
declare function NumberedTable<RecordType extends object>({ rowNumber, pagination, columns, children, dataSource, expandable, expandIconColumnIndex, onChange, scroll, ...props }: PropsWithChildren<TableProps<RecordType>> & RefAttributes<TableRef>): react.FunctionComponentElement<TableProps$1<RecordType> & {
|
|
80
|
+
children?: ReactNode | undefined;
|
|
81
|
+
} & RefAttributes<antd.TableRef>>;
|
|
82
|
+
type NumberedTableComponent = typeof NumberedTable & typeof Table$1;
|
|
83
|
+
declare const Table: NumberedTableComponent;
|
|
59
84
|
|
|
60
85
|
declare const Typography: typeof Typography$1;
|
|
61
86
|
|
|
@@ -243,6 +268,8 @@ interface SessionReplayProps {
|
|
|
243
268
|
endOffsetMs?: number;
|
|
244
269
|
/** 官方快照恢复后自动播放;默认 false,便于观看短片段。 */
|
|
245
270
|
autoPlay?: boolean;
|
|
271
|
+
/** 默认关闭;启用后播放 rrweb 已采集的连续鼠标轨迹。 */
|
|
272
|
+
mouseTrail?: boolean;
|
|
246
273
|
/** 纯可见时间标记,不读取或解析业务对象。 */
|
|
247
274
|
markers?: readonly SessionReplayMarker[];
|
|
248
275
|
/** 控制栏上方的简短提示、图例或额外操作。 */
|
|
@@ -611,4 +638,4 @@ declare function mapSchemaField(field: SchemaField): SchemaFieldMapping;
|
|
|
611
638
|
/** 从字段默认值生成表单初值;调用方的 initialValues 可在渲染层覆盖。 */
|
|
612
639
|
declare function schemaInitialValues(schema: SchemaFormSchema): SchemaFormValues;
|
|
613
640
|
|
|
614
|
-
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, CrudWorkspace, type CrudWorkspaceProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, ErrorReportButton, type ErrorReportButtonProps, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, OperationToolbar, type OperationToolbarProps, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, ReportErrorProvider, type ReportErrorProviderProps, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
|
|
641
|
+
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, CrudWorkspace, type CrudWorkspaceProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, ErrorReportButton, type ErrorReportButtonProps, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, OperationToolbar, type OperationToolbarProps, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, ReportErrorProvider, type ReportErrorProviderProps, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, type TableProps, type TableRowNumberConfig, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
|
package/dist/index.js
CHANGED
|
@@ -241,9 +241,10 @@ var Select = Object.assign(wrapAntComponent(AntSelect, "Select"), {
|
|
|
241
241
|
|
|
242
242
|
// src/components/Table.ts
|
|
243
243
|
import { Table as AntTable } from "antd";
|
|
244
|
-
import { createElement as createElement2 } from "react";
|
|
244
|
+
import { Children, createElement as createElement2, isValidElement, useState as useState2 } from "react";
|
|
245
245
|
|
|
246
246
|
// src/internal/paginationTotal.ts
|
|
247
|
+
var DEFAULT_PAGE_SIZE = 10;
|
|
247
248
|
function paginationTotal(total) {
|
|
248
249
|
return `\u5171 ${total} \u6761`;
|
|
249
250
|
}
|
|
@@ -288,19 +289,119 @@ function TableEmpty({ className, description = "\u6682\u65E0\u6570\u636E", image
|
|
|
288
289
|
}
|
|
289
290
|
|
|
290
291
|
// src/components/Table.ts
|
|
292
|
+
var ROW_NUMBER_KEY = "__adminsmart_row_number";
|
|
293
|
+
var DEFAULT_NUMBER_WIDTH = 64;
|
|
291
294
|
function normalizeTableProps(props) {
|
|
292
295
|
const locale = props.locale ?? {};
|
|
293
296
|
const content = locale.emptyText;
|
|
294
297
|
const emptyText = content === void 0 ? createElement2(TableEmpty) : typeof content === "string" || typeof content === "number" ? createElement2(TableEmpty, { description: content }) : content;
|
|
295
298
|
const pagination = props.pagination;
|
|
296
|
-
const tablePagination = pagination === false ? false : { showTotal: paginationTotal, ...pagination };
|
|
299
|
+
const tablePagination = pagination === false ? false : { defaultPageSize: DEFAULT_PAGE_SIZE, showTotal: paginationTotal, ...pagination };
|
|
297
300
|
return { ...props, locale: { ...locale, emptyText }, pagination: tablePagination };
|
|
298
301
|
}
|
|
302
|
+
function isControlColumn(column) {
|
|
303
|
+
return column === AntTable.SELECTION_COLUMN || column === AntTable.EXPAND_COLUMN;
|
|
304
|
+
}
|
|
305
|
+
function NumberedTable({ rowNumber = true, pagination, columns, children, dataSource, expandable, expandIconColumnIndex, onChange, scroll, ...props }) {
|
|
306
|
+
const nativePagination = pagination || void 0;
|
|
307
|
+
const [innerPage, setInnerPage] = useState2(() => ({
|
|
308
|
+
current: nativePagination?.defaultCurrent ?? 1,
|
|
309
|
+
// 未显式控制页码时跟踪 native Table 的切页结果。
|
|
310
|
+
size: nativePagination?.defaultPageSize ?? DEFAULT_PAGE_SIZE
|
|
311
|
+
// 以与 Ant 相同的首次实际页大小为准。
|
|
312
|
+
}));
|
|
313
|
+
const [, refreshTreeNumbers] = useState2(0);
|
|
314
|
+
const passedChildren = Children.toArray(children).filter(isValidElement);
|
|
315
|
+
const numberConfig = typeof rowNumber === "object" ? rowNumber : void 0;
|
|
316
|
+
const firstBusiness = columns?.findIndex((column) => !isControlColumn(column)) ?? 0;
|
|
317
|
+
if (!rowNumber || firstBusiness < 0 || columns == null && passedChildren.length === 0) {
|
|
318
|
+
return createElement2(AntTable, { ...props, pagination, columns, children, dataSource, expandable, expandIconColumnIndex, onChange, scroll });
|
|
319
|
+
}
|
|
320
|
+
const pageSize = numberConfig?.pageSize ?? nativePagination?.pageSize ?? innerPage.size;
|
|
321
|
+
const requestedPage = numberConfig?.current ?? (pagination === false ? 1 : nativePagination?.current ?? innerPage.current);
|
|
322
|
+
const maximumPage = pagination === false || numberConfig?.current != null ? requestedPage : Math.max(1, Math.ceil((nativePagination?.total || dataSource?.length || 0) / pageSize));
|
|
323
|
+
const current = Math.min(requestedPage, maximumPage);
|
|
324
|
+
const offset = (current - 1) * pageSize;
|
|
325
|
+
const width = numberConfig?.width ?? DEFAULT_NUMBER_WIDTH;
|
|
326
|
+
const childField = expandable?.childrenColumnName ?? props.childrenColumnName ?? "children";
|
|
327
|
+
const treeRows = Boolean(dataSource?.some((row) => row[childField]));
|
|
328
|
+
const visibleTreeOrder = treeRows ? /* @__PURE__ */ new WeakMap() : void 0;
|
|
329
|
+
const numberColumn = {
|
|
330
|
+
key: ROW_NUMBER_KEY,
|
|
331
|
+
// 序号列不占用宿主字段、不参与筛选或列显隐设置。
|
|
332
|
+
title: numberConfig?.title ?? "\u5E8F\u53F7",
|
|
333
|
+
// 空列表也显示序号表头。
|
|
334
|
+
width,
|
|
335
|
+
// 保证带选择按钮或横向滚动时列尺寸稳定。
|
|
336
|
+
align: "center",
|
|
337
|
+
// Ant 的新列表头和数据单元格一起居中。
|
|
338
|
+
className: "adminsmart-table-row-number",
|
|
339
|
+
// 可供宿主做视觉或无障碍验收的固定类名。
|
|
340
|
+
onCell: visibleTreeOrder ? (row, index) => {
|
|
341
|
+
if (index != null) visibleTreeOrder.set(row, index);
|
|
342
|
+
return {};
|
|
343
|
+
} : void 0,
|
|
344
|
+
render: (_value, row, index) => offset + (visibleTreeOrder?.get(row) ?? index) + 1
|
|
345
|
+
// 跟随排序、筛选及本页展开顺序。
|
|
346
|
+
};
|
|
347
|
+
const numberedColumns = columns == null ? void 0 : [...columns.slice(0, firstBusiness), numberColumn, ...columns.slice(firstBusiness)];
|
|
348
|
+
const numberedChildren = columns == null ? [createElement2(AntTable.Column, numberColumn), ...passedChildren] : children;
|
|
349
|
+
const nativeExpandIndex = expandable?.expandIconColumnIndex ?? expandIconColumnIndex;
|
|
350
|
+
const originalTreeIndex = nativeExpandIndex == null ? props.rowSelection ? 1 : 0 : props.rowSelection && nativeExpandIndex > 0 ? nativeExpandIndex - 1 : nativeExpandIndex;
|
|
351
|
+
const selectionBefore = props.rowSelection && !columns?.includes(AntTable.SELECTION_COLUMN) ? 1 : 0;
|
|
352
|
+
const actualIntro = firstBusiness + selectionBefore;
|
|
353
|
+
const shiftedTreeIndex = originalTreeIndex >= actualIntro ? originalTreeIndex + 1 : originalTreeIndex;
|
|
354
|
+
const nextExpandIndex = treeRows ? props.rowSelection && shiftedTreeIndex > 0 ? shiftedTreeIndex + 1 : shiftedTreeIndex : nativeExpandIndex != null && nativeExpandIndex > firstBusiness ? nativeExpandIndex + 1 : nativeExpandIndex;
|
|
355
|
+
const numberedExpandable = {
|
|
356
|
+
...expandable,
|
|
357
|
+
...nextExpandIndex == null ? {} : { expandIconColumnIndex: nextExpandIndex },
|
|
358
|
+
// 保留既有展开图标所在的业务列。
|
|
359
|
+
...treeRows ? {
|
|
360
|
+
onExpandedRowsChange: (keys) => {
|
|
361
|
+
refreshTreeNumbers((revision) => revision + 1);
|
|
362
|
+
if (expandable?.onExpandedRowsChange) expandable.onExpandedRowsChange(keys);
|
|
363
|
+
else props.onExpandedRowsChange?.([...keys]);
|
|
364
|
+
}
|
|
365
|
+
} : {}
|
|
366
|
+
// 只跟踪原生展开事件;宿主控制的展开键和回调仍照常执行。
|
|
367
|
+
};
|
|
368
|
+
const handleChange = (next, filters, sorter, extra) => {
|
|
369
|
+
if (pagination !== false) {
|
|
370
|
+
setInnerPage({
|
|
371
|
+
current: next.current ?? 1,
|
|
372
|
+
// Ant 的筛选过程会把当前页重置到 1。
|
|
373
|
+
size: next.pageSize ?? DEFAULT_PAGE_SIZE
|
|
374
|
+
// 原生切换每页条数会同步更新编号偏移。
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
onChange?.(next, filters, sorter, extra);
|
|
378
|
+
};
|
|
379
|
+
return createElement2(AntTable, {
|
|
380
|
+
...props,
|
|
381
|
+
pagination,
|
|
382
|
+
columns: numberedColumns,
|
|
383
|
+
children: numberedChildren,
|
|
384
|
+
dataSource,
|
|
385
|
+
expandable: treeRows || nextExpandIndex != null ? numberedExpandable : expandable,
|
|
386
|
+
onChange: handleChange,
|
|
387
|
+
scroll: typeof scroll?.x === "number" ? { ...scroll, x: scroll.x + width } : scroll
|
|
388
|
+
});
|
|
389
|
+
}
|
|
299
390
|
var Summary = Object.assign(wrapAntComponent(AntTable.Summary, "Table.Summary"), {
|
|
300
391
|
Row: wrapAntComponent(AntTable.Summary.Row, "Table.Summary.Row"),
|
|
301
392
|
Cell: wrapAntComponent(AntTable.Summary.Cell, "Table.Summary.Cell")
|
|
302
393
|
});
|
|
303
|
-
var Table = Object.assign(wrapAntComponent(
|
|
394
|
+
var Table = Object.assign(wrapAntComponent(NumberedTable, "Table", {}, normalizeTableProps), {
|
|
395
|
+
EXPAND_COLUMN: AntTable.EXPAND_COLUMN,
|
|
396
|
+
// 与 Ant 内部引用相同,否则不能识别占位列。
|
|
397
|
+
SELECTION_COLUMN: AntTable.SELECTION_COLUMN,
|
|
398
|
+
// 保留显式勾选列的位置控制。
|
|
399
|
+
SELECTION_ALL: AntTable.SELECTION_ALL,
|
|
400
|
+
// 透传原生全选选项。
|
|
401
|
+
SELECTION_INVERT: AntTable.SELECTION_INVERT,
|
|
402
|
+
// 透传原生反选选项。
|
|
403
|
+
SELECTION_NONE: AntTable.SELECTION_NONE,
|
|
404
|
+
// 透传原生清空选项。
|
|
304
405
|
Column: wrapAntComponent(AntTable.Column, "Table.Column"),
|
|
305
406
|
ColumnGroup: wrapAntComponent(AntTable.ColumnGroup, "Table.ColumnGroup"),
|
|
306
407
|
Summary
|
|
@@ -375,12 +476,17 @@ var ListItem = Object.assign(wrapAntComponent(AntList.Item, "List.Item"), {
|
|
|
375
476
|
});
|
|
376
477
|
function normalizeListProps(props) {
|
|
377
478
|
const pagination = props.pagination;
|
|
378
|
-
return pagination && typeof pagination === "object" ? { ...props, pagination: { showTotal: paginationTotal, ...pagination } } : props;
|
|
479
|
+
return pagination && typeof pagination === "object" ? { ...props, pagination: { defaultPageSize: DEFAULT_PAGE_SIZE, showTotal: paginationTotal, ...pagination } } : props;
|
|
379
480
|
}
|
|
380
481
|
var List = Object.assign(wrapAntComponent(AntList, "List", {}, normalizeListProps), {
|
|
381
482
|
Item: ListItem
|
|
382
483
|
});
|
|
383
|
-
var Pagination = wrapAntComponent(AntPagination, "Pagination", {
|
|
484
|
+
var Pagination = wrapAntComponent(AntPagination, "Pagination", {
|
|
485
|
+
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
486
|
+
// 宿主可用 pageSize 或 defaultPageSize 覆盖初始十条。
|
|
487
|
+
showTotal: paginationTotal
|
|
488
|
+
// 默认展示筛选后的完整记录数。
|
|
489
|
+
});
|
|
384
490
|
var Tree = Object.assign(wrapAntComponent(AntTree, "Tree"), {
|
|
385
491
|
DirectoryTree: wrapAntComponent(AntTree.DirectoryTree, "Tree.DirectoryTree"),
|
|
386
492
|
TreeNode: wrapAntComponent(AntTree.TreeNode, "Tree.TreeNode")
|
|
@@ -605,7 +711,7 @@ var BusinessDrawer = forwardRef3(function BusinessDrawer2({ sizeVariant = "stand
|
|
|
605
711
|
});
|
|
606
712
|
|
|
607
713
|
// src/composites/SessionReplay.tsx
|
|
608
|
-
import { forwardRef as forwardRef4, useCallback as useCallback2, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as
|
|
714
|
+
import { forwardRef as forwardRef4, useCallback as useCallback2, useEffect as useEffect3, useImperativeHandle, useRef as useRef3, useState as useState4 } from "react";
|
|
609
715
|
import { FullscreenExitOutlined, FullscreenOutlined, PauseOutlined, PlayCircleOutlined, RedoOutlined, StepBackwardOutlined, StepForwardOutlined } from "@ant-design/icons";
|
|
610
716
|
import { Alert as Alert2, Button as Button2, Empty as Empty2, Select as Select2, Slider as Slider2, Spin as Spin2, Tag as Tag2, Tooltip as Tooltip2, Typography as Typography2, theme } from "antd";
|
|
611
717
|
|
|
@@ -756,7 +862,7 @@ function replayClock(timeMs) {
|
|
|
756
862
|
}
|
|
757
863
|
|
|
758
864
|
// src/composites/useSessionReplay.ts
|
|
759
|
-
import { useCallback, useEffect as useEffect2, useRef as useRef2, useState as
|
|
865
|
+
import { useCallback, useEffect as useEffect2, useRef as useRef2, useState as useState3 } from "react";
|
|
760
866
|
|
|
761
867
|
// src/composites/sessionReplayEngine.ts
|
|
762
868
|
async function loadReplayEngine() {
|
|
@@ -780,7 +886,7 @@ function initialState(status) {
|
|
|
780
886
|
};
|
|
781
887
|
}
|
|
782
888
|
function useSessionReplay(options) {
|
|
783
|
-
const [state, setState] =
|
|
889
|
+
const [state, setState] = useState3(() => initialState("idle"));
|
|
784
890
|
const stateRef = useRef2(state);
|
|
785
891
|
const engineRef = useRef2(null);
|
|
786
892
|
const runtimeFailureRef = useRef2(null);
|
|
@@ -917,6 +1023,7 @@ function useSessionReplay(options) {
|
|
|
917
1023
|
if (!current || failed || player || !Constructor || !stageRef.current || !rootRef.current) return;
|
|
918
1024
|
if (stageRef.current.clientWidth <= 0 || stageRef.current.clientHeight <= 0) return;
|
|
919
1025
|
try {
|
|
1026
|
+
const mouseTrailColor = callbackRef.current.mouseTrailColor;
|
|
920
1027
|
player = new Constructor(prepared, {
|
|
921
1028
|
root: rootRef.current,
|
|
922
1029
|
// 实例只能挂载在自己的专属节点。
|
|
@@ -926,8 +1033,8 @@ function useSessionReplay(options) {
|
|
|
926
1033
|
// 不输出授权录像数据。
|
|
927
1034
|
showWarning: false,
|
|
928
1035
|
// 友好错误由包装层统一处理。
|
|
929
|
-
mouseTail: false,
|
|
930
|
-
//
|
|
1036
|
+
mouseTail: mouseTrailColor ? { strokeStyle: mouseTrailColor } : false,
|
|
1037
|
+
// 官方只在回放外层绘制已录制的鼠标轨迹。
|
|
931
1038
|
triggerFocus: false,
|
|
932
1039
|
// 回放不能改变宿主焦点。
|
|
933
1040
|
UNSAFE_replayCanvas: false,
|
|
@@ -1007,6 +1114,16 @@ function useSessionReplay(options) {
|
|
|
1007
1114
|
releaseEngine();
|
|
1008
1115
|
};
|
|
1009
1116
|
}, [options.active, options.loading, options.error, options.events, options.startOffsetMs, options.endOffsetMs, options.autoPlay, options.stageRef, options.rootRef, publish]);
|
|
1117
|
+
useEffect2(() => {
|
|
1118
|
+
const player = engineRef.current;
|
|
1119
|
+
if (!player) return;
|
|
1120
|
+
const color = options.mouseTrailColor;
|
|
1121
|
+
try {
|
|
1122
|
+
player.setConfig({ mouseTail: color ? { strokeStyle: color } : false });
|
|
1123
|
+
} catch {
|
|
1124
|
+
runtimeFailureRef.current?.();
|
|
1125
|
+
}
|
|
1126
|
+
}, [options.mouseTrailColor]);
|
|
1010
1127
|
const play = useCallback(() => {
|
|
1011
1128
|
if (!engineRef.current || stateRef.current.status !== "ready" || !rangeRef.current.total) return;
|
|
1012
1129
|
const target = stateRef.current.currentTimeMs >= rangeRef.current.total ? 0 : stateRef.current.currentTimeMs;
|
|
@@ -1062,13 +1179,13 @@ function useSessionReplay(options) {
|
|
|
1062
1179
|
// src/composites/SessionReplay.tsx
|
|
1063
1180
|
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
1064
1181
|
var playbackRates = [0.5, 1, 1.5, 2];
|
|
1065
|
-
var SessionReplay = forwardRef4(function SessionReplay2({ events, active = true, loading = false, error, startOffsetMs, endOffsetMs, autoPlay = false, markers = [], extra, onStateChange, onError, className, style }, ref) {
|
|
1182
|
+
var SessionReplay = forwardRef4(function SessionReplay2({ events, active = true, loading = false, error, startOffsetMs, endOffsetMs, autoPlay = false, mouseTrail = false, markers = [], extra, onStateChange, onError, className, style }, ref) {
|
|
1066
1183
|
const { token } = theme.useToken();
|
|
1067
1184
|
const containerRef = useRef3(null);
|
|
1068
1185
|
const stageRef = useRef3(null);
|
|
1069
1186
|
const rootRef = useRef3(null);
|
|
1070
|
-
const [problem, setProblem] =
|
|
1071
|
-
const [fullscreen, setFullscreen] =
|
|
1187
|
+
const [problem, setProblem] = useState4(null);
|
|
1188
|
+
const [fullscreen, setFullscreen] = useState4(false);
|
|
1072
1189
|
const reportError = useCallback2((value) => {
|
|
1073
1190
|
setProblem(value);
|
|
1074
1191
|
onError?.(value);
|
|
@@ -1076,7 +1193,8 @@ var SessionReplay = forwardRef4(function SessionReplay2({ events, active = true,
|
|
|
1076
1193
|
useEffect3(() => {
|
|
1077
1194
|
setProblem(null);
|
|
1078
1195
|
}, [events, active, loading, error, startOffsetMs, endOffsetMs]);
|
|
1079
|
-
const
|
|
1196
|
+
const mouseTrailColor = mouseTrail ? token.colorPrimary : void 0;
|
|
1197
|
+
const controls = useSessionReplay({ events, active, loading, error, startOffsetMs, endOffsetMs, autoPlay, mouseTrailColor, stageRef, rootRef, onStateChange, onError: reportError });
|
|
1080
1198
|
const { state, play, pause, seek, restart, getState, setPlaybackRate } = controls;
|
|
1081
1199
|
const ready = state.status === "ready";
|
|
1082
1200
|
const themeStyle = {
|
|
@@ -1201,19 +1319,19 @@ var SessionReplay = forwardRef4(function SessionReplay2({ events, active = true,
|
|
|
1201
1319
|
// src/composites/SearchPanel.tsx
|
|
1202
1320
|
import { DownOutlined, UpOutlined } from "@ant-design/icons";
|
|
1203
1321
|
import {
|
|
1204
|
-
Children,
|
|
1322
|
+
Children as Children2,
|
|
1205
1323
|
forwardRef as forwardRef5,
|
|
1206
|
-
isValidElement,
|
|
1324
|
+
isValidElement as isValidElement2,
|
|
1207
1325
|
useEffect as useEffect4,
|
|
1208
1326
|
useRef as useRef5,
|
|
1209
|
-
useState as
|
|
1327
|
+
useState as useState6
|
|
1210
1328
|
} from "react";
|
|
1211
1329
|
|
|
1212
1330
|
// src/composites/OperationToolbar.tsx
|
|
1213
1331
|
import { createContext, useContext } from "react";
|
|
1214
1332
|
|
|
1215
1333
|
// src/composites/ErrorReportButton.tsx
|
|
1216
|
-
import { useRef as useRef4, useState as
|
|
1334
|
+
import { useRef as useRef4, useState as useState5 } from "react";
|
|
1217
1335
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1218
1336
|
function ErrorReportButton({
|
|
1219
1337
|
onReport,
|
|
@@ -1222,7 +1340,7 @@ function ErrorReportButton({
|
|
|
1222
1340
|
description
|
|
1223
1341
|
}) {
|
|
1224
1342
|
const pending = useRef4(false);
|
|
1225
|
-
const [reporting, setReporting] =
|
|
1343
|
+
const [reporting, setReporting] = useState5(false);
|
|
1226
1344
|
async function report() {
|
|
1227
1345
|
if (disabled || pending.current) return;
|
|
1228
1346
|
pending.current = true;
|
|
@@ -1280,9 +1398,9 @@ function collapsedSearchFieldLimit(columns) {
|
|
|
1280
1398
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1281
1399
|
var SearchPanel = forwardRef5(function SearchPanel2({ fields, actions, tools, trailingTools, searchVisible = true, defaultExpanded = false, role = "search", style, ...props }, ref) {
|
|
1282
1400
|
const rootRef = useRef5(null);
|
|
1283
|
-
const [width, setWidth] =
|
|
1284
|
-
const [expanded, setExpanded] =
|
|
1285
|
-
const items =
|
|
1401
|
+
const [width, setWidth] = useState6(0);
|
|
1402
|
+
const [expanded, setExpanded] = useState6(defaultExpanded);
|
|
1403
|
+
const items = Children2.toArray(fields);
|
|
1286
1404
|
const columns = searchColumnCount(width);
|
|
1287
1405
|
const collapsedLimit = collapsedSearchFieldLimit(columns);
|
|
1288
1406
|
const hasMore = items.length > collapsedLimit;
|
|
@@ -1327,7 +1445,7 @@ var SearchPanel = forwardRef5(function SearchPanel2({ fields, actions, tools, tr
|
|
|
1327
1445
|
style: { minWidth: 0, width: fieldWidth || "min(240px, 100%)", flex: "0 0 auto" },
|
|
1328
1446
|
children: item
|
|
1329
1447
|
},
|
|
1330
|
-
|
|
1448
|
+
isValidElement2(item) ? item.key ?? index : index
|
|
1331
1449
|
)),
|
|
1332
1450
|
/* @__PURE__ */ jsxs3("div", { "data-adminsmart-search-actions": "true", style: { display: "flex", alignItems: "center", gap: 8, minHeight: 32 }, children: [
|
|
1333
1451
|
hasMore ? /* @__PURE__ */ jsx7(
|
|
@@ -1349,7 +1467,7 @@ var SearchPanel = forwardRef5(function SearchPanel2({ fields, actions, tools, tr
|
|
|
1349
1467
|
|
|
1350
1468
|
// src/composites/TableControls.tsx
|
|
1351
1469
|
import { ReloadOutlined, SearchOutlined, SettingOutlined } from "@ant-design/icons";
|
|
1352
|
-
import { useId, useRef as useRef6, useState as
|
|
1470
|
+
import { useId, useRef as useRef6, useState as useState7 } from "react";
|
|
1353
1471
|
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1354
1472
|
function TableControls({
|
|
1355
1473
|
searchVisible = true,
|
|
@@ -1362,7 +1480,7 @@ function TableControls({
|
|
|
1362
1480
|
className,
|
|
1363
1481
|
style
|
|
1364
1482
|
}) {
|
|
1365
|
-
const [open, setOpen] =
|
|
1483
|
+
const [open, setOpen] = useState7(false);
|
|
1366
1484
|
const triggerRef = useRef6(null);
|
|
1367
1485
|
const panelRef = useRef6(null);
|
|
1368
1486
|
const panelId = useId();
|
|
@@ -1473,7 +1591,7 @@ import {
|
|
|
1473
1591
|
useContext as useContext2,
|
|
1474
1592
|
useLayoutEffect,
|
|
1475
1593
|
useRef as useRef7,
|
|
1476
|
-
useState as
|
|
1594
|
+
useState as useState8
|
|
1477
1595
|
} from "react";
|
|
1478
1596
|
|
|
1479
1597
|
// src/composites/CrudWorkspace.tsx
|
|
@@ -1515,7 +1633,7 @@ function DataTableInner({
|
|
|
1515
1633
|
...tableProps
|
|
1516
1634
|
}, ref) {
|
|
1517
1635
|
const containerRef = useRef7(null);
|
|
1518
|
-
const [bodyHeight, setBodyHeight] =
|
|
1636
|
+
const [bodyHeight, setBodyHeight] = useState8(360);
|
|
1519
1637
|
const inWorkspace = useContext2(CrudTableHeightContext);
|
|
1520
1638
|
const tableHeight = containerHeight ?? (inWorkspace && containerStyle?.height == null ? "100%" : void 0);
|
|
1521
1639
|
const hasExplicitHeight = tableHeight != null || containerStyle?.height != null;
|
|
@@ -1691,12 +1809,12 @@ function EllipsisText({
|
|
|
1691
1809
|
|
|
1692
1810
|
// src/composites/RowActions.tsx
|
|
1693
1811
|
import { EllipsisOutlined } from "@ant-design/icons";
|
|
1694
|
-
import { Children as
|
|
1812
|
+
import { Children as Children3, Fragment, isValidElement as isValidElement3 } from "react";
|
|
1695
1813
|
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1696
1814
|
function collectButtons(children) {
|
|
1697
1815
|
const actions = [];
|
|
1698
|
-
|
|
1699
|
-
if (!
|
|
1816
|
+
Children3.forEach(children, (child) => {
|
|
1817
|
+
if (!isValidElement3(child)) return;
|
|
1700
1818
|
if (child.type === Fragment) actions.push(...collectButtons(child.props.children));
|
|
1701
1819
|
else {
|
|
1702
1820
|
if (child.type !== Button && child.type !== "button") throw new TypeError("RowActions \u53EA\u63A5\u53D7\u5DF2\u6309\u6743\u9650\u7B5B\u9009\u7684 Button \u6216 Fragment");
|