weifuwu 0.69.0 → 0.71.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.
Files changed (38) hide show
  1. package/README.md +8 -8
  2. package/dist/client/diff.d.ts +7 -6
  3. package/dist/client/index.js +5 -5
  4. package/dist/client/registry.d.ts +17 -2
  5. package/dist/client/render.d.ts +12 -5
  6. package/dist/client/router.d.ts +3 -2
  7. package/dist/client/types.d.ts +41 -18
  8. package/dist/client/ui.d.ts +7 -1
  9. package/dist/client/vnode.d.ts +12 -5
  10. package/dist/components/ApprovalCard/ApprovalCard.d.ts +2 -0
  11. package/dist/components/Badge/Badge.d.ts +6 -0
  12. package/dist/components/Card/Card.d.ts +2 -0
  13. package/dist/components/Cascader/Cascader.d.ts +6 -2
  14. package/dist/components/CodeBlock/CodeBlock.d.ts +2 -2
  15. package/dist/components/CodeBlock/highlight.d.ts +15 -0
  16. package/dist/components/Drawer/Drawer.d.ts +2 -0
  17. package/dist/components/EmptyState/EmptyState.d.ts +3 -2
  18. package/dist/components/Icon/Icon.d.ts +1 -1
  19. package/dist/components/InputNumber/InputNumber.d.ts +2 -2
  20. package/dist/components/Layout/Layout.d.ts +2 -0
  21. package/dist/components/Markdown/parser.d.ts +11 -5
  22. package/dist/components/Menu/Menu.d.ts +1 -1
  23. package/dist/components/ProgressBar/ProgressBar.d.ts +5 -0
  24. package/dist/components/Rate/Rate.d.ts +2 -0
  25. package/dist/components/Sparkline/Sparkline.d.ts +2 -0
  26. package/dist/components/StatCard/StatCard.d.ts +5 -3
  27. package/dist/components/Timeline/Timeline.d.ts +5 -4
  28. package/dist/components/Transfer/Transfer.d.ts +6 -2
  29. package/dist/components/Tree/Tree.d.ts +3 -1
  30. package/dist/components/VirtualTable/VirtualTable.d.ts +9 -1
  31. package/dist/components/index.d.ts +1 -1
  32. package/dist/components/index.js +14 -14
  33. package/dist/components/style.css +874 -331
  34. package/dist/index.js +8 -1
  35. package/dist/layout/weifuwu-layout.css +193 -25
  36. package/docs/components.md +2 -2
  37. package/docs/layout.md +37 -9
  38. package/package.json +1 -1
@@ -18,17 +18,23 @@ export interface UiInternal {
18
18
  bumpCtxVersion(): void;
19
19
  /** 异步批处理调度标记(dirty 微任务防重入) */
20
20
  _dirtyScheduled?: boolean;
21
+ /** 渲染期调 render() 的推迟标记(防重入——见 ui.ts render 实现) */
22
+ _pendingRender?: boolean;
23
+ /** 渲染期调 dirty() 的推迟标记(防重入——见 ui.ts dirty 实现) */
24
+ _pendingDirty?: boolean;
21
25
  /** ctx.ui.$() 的 WeakMap 缓存(每组件一个 $ 容器) */
22
26
  _$cache?: Record<string, any>;
23
27
  /** mount 阶段标记(内部——mountComponent 包裹) */
24
28
  setMounting: (v: boolean) => void;
25
29
  endMounting: () => void;
30
+ /** ErrorBoundary 注入的错误处理器(子组件 render 抛错时调用) */
31
+ _errorHandler?: (err: unknown) => void;
26
32
  }
27
33
  /** createUi 依赖(由 createApp 注入 app 级闭包状态) */
28
34
  export interface UiDeps {
29
35
  ctx: WfuiContext;
30
36
  renderByIds: (ids: string[]) => void;
31
- getSelfId: (ui: any) => string | undefined;
37
+ getSelfId: (ui: WfuiContext['ui'] | undefined) => string | undefined;
32
38
  dirtyBatch: Set<string>;
33
39
  dirtySet: Set<string>;
34
40
  mediaRegistry: Map<string, {
@@ -8,19 +8,24 @@
8
8
  */
9
9
  import type { WfuiContext } from './types.ts';
10
10
  export type VNodeType = string | Component<any, any> | AsyncComponent | typeof Fragment | typeof Portal;
11
+ /**
12
+ * VNode 子节点合法值——组件可返回/渲染的多态内容。
13
+ * 递归联合:string/number/VNode/array/null/boolean 任意组合。
14
+ */
15
+ export type VNodeChild = VNode | string | number | boolean | null | undefined | VNodeChild[];
11
16
  export interface VNode {
12
17
  type: VNodeType;
13
18
  props: Record<string, any>;
14
19
  key?: string;
15
20
  el?: Node;
16
21
  /** 子 VNode 缓存(用于 patchValue diff,避免重复执行组件) */
17
- _child?: any;
22
+ _child?: VNode | VNode[] | null;
18
23
  /** 远程 DOM 容器(Portal 等 remote VNode 的 DOM 所在处) */
19
24
  _remoteEl?: HTMLElement | undefined;
20
25
  /** VNode 的 DOM 归属:'local' 在父 DOM 树下,'remote' 在别处 */
21
26
  _placement?: 'local' | 'remote';
22
27
  /** 两阶段组件的 render 函数(mount 返回的函数) */
23
- _render?: (props: any) => VNode | null;
28
+ _render?: (props: Record<string, unknown>) => VNode | null;
24
29
  /** 组件实例 ID(如 '_wf_0') */
25
30
  _id?: string;
26
31
  /** 自定义组件 ID(ctx.ui.selfId() 注册,跨组件精准刷新) */
@@ -29,6 +34,8 @@ export interface VNode {
29
34
  _parentNode?: Node;
30
35
  /** 组件输出的第一个 DOM 节点 */
31
36
  _refNode?: Node | null;
37
+ /** Fragment 展开后的多个直属 DOM 节点范围(diff 对齐用,见 diff.ts) */
38
+ _childNodes?: Node[];
32
39
  /** 组件 mount/render 时的 ctx 版本号(供三态 skip 判定) */
33
40
  _ctxVersion?: number;
34
41
  }
@@ -73,7 +80,7 @@ export declare const Portal: unique symbol;
73
80
  declare global {
74
81
  namespace JSX {
75
82
  type Element = VNode | null;
76
- type ElementType = string | Component<any>;
83
+ type ElementType = string | Component<any, any>;
77
84
  interface IntrinsicAttributes {
78
85
  key?: string | number;
79
86
  }
@@ -86,10 +93,10 @@ export declare function jsx(type: VNodeType, props: Record<string, any> | null,
86
93
  export declare const jsxs: typeof jsx;
87
94
  export declare function jsxDEV(type: VNodeType, props: Record<string, any> | null, key?: string | null): VNode;
88
95
  /** `h`(hyperscript)支持 variadic children: `h('div', {class:'x'}, child1, child2)` */
89
- export declare function h(type: VNodeType, props: Record<string, any> | null, ...children: any[]): VNode;
96
+ export declare function h(type: VNodeType, props: Record<string, any> | null, ...children: VNodeChild[]): VNode;
90
97
  export declare function isNative(vnode: VNode): boolean;
91
98
  export declare function isComponent(vnode: VNode): boolean;
92
99
  export declare function isFragment(vnode: VNode): boolean;
93
100
  export declare function isPortal(vnode: VNode): boolean;
94
101
  /** Portal VNode — 子节点渲染到 document.body#__wf_portal 中 */
95
- export declare function createPortal(children: any, portalKey?: string): VNode;
102
+ export declare function createPortal(children: VNodeChild, portalKey?: string): VNode;
@@ -26,5 +26,7 @@ export interface ApprovalCardProps {
26
26
  onReject?: (note?: string) => void;
27
27
  /** 自定义详情渲染(默认显示 name + args) */
28
28
  renderDetail?: (request: WfApprovalRequest) => any;
29
+ /** 提交中(按钮禁用 + 文案反馈,防连点) */
30
+ loading?: boolean;
29
31
  }
30
32
  export declare const ApprovalCard: Component<ApprovalCardProps>;
@@ -4,5 +4,11 @@ export interface BadgeProps {
4
4
  variant?: BadgeVariant;
5
5
  dot?: boolean;
6
6
  children?: any;
7
+ /** 数值角标(与 children 互斥;超出 overflowCount 显示 N+) */
8
+ count?: number;
9
+ /** 数值溢出阈值,默认 99(count > 阈值 → 阈值+) */
10
+ overflowCount?: number;
11
+ /** count=0 时是否显示(默认 false 隐藏,antd showZero=false 语义) */
12
+ showZero?: boolean;
7
13
  }
8
14
  export declare const Badge: Component<BadgeProps>;
@@ -10,6 +10,8 @@ export interface CardProps {
10
10
  /** 选中态(边框高亮 + 品牌浅底),适合选择卡片 */
11
11
  active?: boolean;
12
12
  onClick?: () => void;
13
+ className?: string;
14
+ style?: Record<string, string>;
13
15
  children?: any;
14
16
  }
15
17
  export declare const Card: Component<CardProps>;
@@ -14,8 +14,12 @@ export interface CascaderProps {
14
14
  disabled?: boolean;
15
15
  error?: string;
16
16
  label?: string;
17
+ /** 显示搜索框(面板内,关键词时扁平过滤结果列表) */
18
+ showSearch?: boolean;
19
+ /** 搜索占位符 */
20
+ searchPlaceholder?: string;
17
21
  'aria-label'?: string;
18
22
  }
19
- /** 级联选择(对应 antd/EP Cascader):多列面板逐级选择,点击叶子完成。
20
- * 裁剪:hover 展开、搜索、任意层级配置、异步加载。 */
23
+ /** 级联选择(对应 antd/EP Cascader):多列面板逐级选择,点击叶子完成 + 可选搜索。
24
+ * 裁剪:hover 展开、任意层级配置、异步加载。 */
21
25
  export declare const Cascader: Component<CascaderProps>;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * weifuwu/components — CodeBlock
3
3
  *
4
- * 代码展示块:语言标签 + 复制按钮 + 横向滚动。
4
+ * 代码展示块:语言标签 + 复制按钮 + 横向滚动 + 自研轻量语法高亮
5
+ * (highlight.ts tokenizer——零依赖 FS-05)。
5
6
  * 由 Markdown 代码围栏复用;也可独立使用。
6
- * 裁剪:不做语法高亮(零依赖,语言标签仅展示)。
7
7
  */
8
8
  import type { Component } from '../../client/vnode.ts';
9
9
  export interface CodeBlockProps {
@@ -0,0 +1,15 @@
1
+ /**
2
+ * weifuwu/components — 轻量语法高亮 tokenizer
3
+ *
4
+ * 零依赖(FS-05):正则单 pass 扫描,覆盖常见语法(注释/字符串/关键字/
5
+ * 数字/函数调用/JSX 标签/操作符)。不追求完美分词(不做括号配对、多行
6
+ * 字符串状态机),聚焦"代码可读性"——足够支撑文档/源码展示。
7
+ *
8
+ * 返回 token 数组:{ type: 'comment'|'string'|'keyword'|'number'|
9
+ * 'function'|'jsx-tag'|'jsx-attr'|'operator'|'text', text }
10
+ */
11
+ export type HighlightToken = {
12
+ type: string;
13
+ text: string;
14
+ };
15
+ export declare function tokenize(code: string, lang?: string): HighlightToken[];
@@ -10,5 +10,7 @@ export interface DrawerProps {
10
10
  onClose?: () => void;
11
11
  children?: any;
12
12
  footer?: any;
13
+ /** 面板宽度(默认 360px——--wf-drawer-width 变量) */
14
+ width?: string;
13
15
  }
14
16
  export declare const Drawer: Component<DrawerProps>;
@@ -1,6 +1,7 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component, VNode } from '../../client/vnode.ts';
2
2
  export interface EmptyStateProps {
3
- icon?: string;
3
+ /** 图标——VNode(推荐 <Icon />)或字符串(emoji/字形);默认 Icon inbox(P3:组件内禁裸 emoji) */
4
+ icon?: string | VNode | null;
4
5
  text?: string;
5
6
  hint?: string;
6
7
  children?: any;
@@ -9,7 +9,7 @@
9
9
  * h(Icon, { name: 'check', size: 16 })
10
10
  */
11
11
  import type { Component } from '../../client/vnode.ts';
12
- export type IconName = 'chevron-down' | 'chevron-up' | 'chevron-left' | 'chevron-right' | 'arrow-left' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'sort' | 'sort-asc' | 'sort-desc' | 'check' | 'close' | 'alert' | 'info' | 'warning' | 'pause' | 'settings' | 'search' | 'send' | 'stop' | 'retry' | 'upload' | 'trash' | 'edit' | 'plus' | 'copy' | 'eye' | 'eye-off' | 'star';
12
+ export type IconName = 'chevron-down' | 'chevron-up' | 'chevron-left' | 'chevron-right' | 'arrow-left' | 'arrow-up' | 'arrow-down' | 'arrow-right' | 'sort' | 'sort-asc' | 'sort-desc' | 'check' | 'close' | 'alert' | 'info' | 'warning' | 'pause' | 'settings' | 'search' | 'send' | 'stop' | 'retry' | 'upload' | 'trash' | 'edit' | 'plus' | 'copy' | 'eye' | 'eye-off' | 'star' | 'dashboard' | 'grid' | 'box' | 'users' | 'user' | 'home' | 'folder' | 'file' | 'file-text' | 'calendar' | 'clock' | 'bell' | 'menu' | 'activity' | 'trending-up' | 'trending-down' | 'database' | 'server' | 'heart' | 'refresh' | 'message' | 'inbox' | 'shield' | 'zap' | 'target' | 'mail' | 'external-link' | 'log-out' | 'lock' | 'list' | 'bar-chart' | 'gauge' | 'paperclip' | 'filter' | 'layers' | 'map-pin' | 'book-open' | 'github' | 'tag' | 'phone' | 'more-vertical' | 'check-circle' | 'alert-circle' | 'wifi' | 'cpu' | 'hard-drive' | 'globe' | 'briefcase' | 'layout';
13
13
  export interface IconProps {
14
14
  name: IconName;
15
15
  /** 尺寸,默认 1em(随字号缩放) */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * weifuwu/components — InputNumber
3
3
  *
4
- * 数字输入:min/max/step + 增减按钮 + precision 格式化。
4
+ * 数字输入:min/max/step + 增减按钮 + precision 格式化 + 长按连增。
5
5
  * 受控 value: number | null;空值 → null;输入 clamp 到 min/max。
6
- * 裁剪:不做长按连增/千分位货币(见 roadmap)。
6
+ * 裁剪:不做千分位货币(见 roadmap)。
7
7
  */
8
8
  import type { Component } from '../../client/vnode.ts';
9
9
  export interface InputNumberProps {
@@ -20,6 +20,8 @@
20
20
  */
21
21
  import type { Component } from '../../client/vnode.ts';
22
22
  export interface LayoutProps {
23
+ style?: any;
24
+ className?: string;
23
25
  children?: any;
24
26
  }
25
27
  export interface LayoutSiderProps {
@@ -4,25 +4,31 @@
4
4
  * 零依赖自研解析器,输出结构化 token(非 HTML 字符串)——
5
5
  * 组件层以 VNode 渲染,天然转义任何用户/AI 内容(无 innerHTML 注入面)。
6
6
  *
7
- * 支持块级:标题(#~####) / 段落 / 列表(有序·无序) / 围栏代码块 / 引用 / 分割线
8
- * 支持行内:**粗体** / *斜体* / `行内代码` / [文本](链接)
7
+ * 支持块级:标题(#~####) / 段落 / 列表(有序·无序·GFM 任务) / 围栏代码块 / 引用 / 分割线 / GFM 表格
8
+ * 支持行内:**粗体** / *斜体* / ~~删除线~~ / `行内代码` / [文本](链接)
9
9
  *
10
- * 诚实裁剪:GFM 表格/任务列表/删除线/脚注/raw HTML/自动链接/语法高亮(见 roadmap)
10
+ * 诚实裁剪:脚注/raw HTML/自动链接/语法高亮(见 roadmap)
11
11
  */
12
12
  export interface MdInline {
13
- type: 'text' | 'code' | 'bold' | 'italic' | 'link';
13
+ type: 'text' | 'code' | 'bold' | 'italic' | 'del' | 'link';
14
14
  text?: string;
15
15
  href?: string;
16
16
  children?: MdInline[];
17
17
  }
18
18
  export interface MdBlock {
19
- type: 'heading' | 'paragraph' | 'list' | 'code' | 'quote' | 'hr';
19
+ type: 'heading' | 'paragraph' | 'list' | 'code' | 'quote' | 'hr' | 'table';
20
20
  level?: number;
21
21
  inline?: MdInline[];
22
22
  ordered?: boolean;
23
23
  items?: MdInline[][];
24
+ /** GFM 任务列表:与 items 平行,null=非任务项 */
25
+ checks?: (boolean | null)[];
24
26
  lang?: string;
25
27
  code?: string;
28
+ /** GFM 表格 */
29
+ headers?: string[];
30
+ rows?: string[][];
31
+ aligns?: ('left' | 'center' | 'right')[];
26
32
  }
27
33
  /** 链接安全:仅 http/https;javascript:/data:/vbscript: 一律拒绝 */
28
34
  export declare function safeUrl(href: string): string | null;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * 导航菜单(侧栏导航):分组项 + 图标 + 选中态 + 方向键导航 + Enter 激活 + 子菜单 + 折叠。
5
5
  * 用于 SaaS 应用侧边导航(替代手写 nav-item 循环)。
6
- * 裁剪:水平菜单栏(Menubar)、折叠时子菜单浮层(popup,见 roadmap)、子菜单自动互斥。
6
+ * 裁剪:水平菜单栏(Menubar,独立组件)、子菜单自动互斥。折叠态子菜单浮层已实现(usePopup 基座)。
7
7
  */
8
8
  import type { Component } from '../../client/vnode.ts';
9
9
  export interface MenuItem {
@@ -1,8 +1,13 @@
1
1
  import type { Component } from '../../client/vnode.ts';
2
2
  export interface ProgressBarProps {
3
+ /** 进度值;undefined = indeterminate(不确定态,动画扫动) */
3
4
  value?: number;
4
5
  max?: number;
5
6
  label?: string;
6
7
  showValue?: boolean;
8
+ /** 状态色(default/success/error/warning) */
9
+ status?: 'default' | 'success' | 'error' | 'warning';
10
+ /** 尺寸 */
11
+ size?: 'sm' | 'md' | 'lg';
7
12
  }
8
13
  export declare const ProgressBar: Component<ProgressBarProps>;
@@ -11,6 +11,8 @@ export interface RateProps {
11
11
  disabled?: boolean;
12
12
  /** 点击当前评分值 → 清除为 0(antd 对齐) */
13
13
  allowClear?: boolean;
14
+ /** 允许半星(0.5 精度;点击左半=半星,右半=整星) */
15
+ allowHalf?: boolean;
14
16
  'aria-label'?: string;
15
17
  }
16
18
  export declare const Rate: Component<RateProps>;
@@ -12,6 +12,8 @@ export interface SparklineProps {
12
12
  fill?: boolean;
13
13
  /** 平滑曲线(Catmull-Rom)——默认折线 */
14
14
  smooth?: boolean;
15
+ /** 可访问名(提供则 role=img + aria-label,否则 aria-hidden 装饰) */
16
+ label?: string;
15
17
  className?: string;
16
18
  }
17
19
  /**
@@ -1,10 +1,12 @@
1
- import type { Component } from '../../client/vnode.ts';
1
+ import type { Component, VNode } from '../../client/vnode.ts';
2
2
  export interface StatCardProps {
3
3
  label: string;
4
- value: string | number;
4
+ /** 展示值——countdown 模式下可选(显示剩余时间) */
5
+ value?: string | number;
5
6
  trend?: 'up' | 'down';
6
7
  trendLabel?: string;
7
- icon?: string;
8
+ /** 图标——字符串(emoji/字形)或 VNode(推荐 <Icon name=... />,禁 emoji 装饰的场景用后者) */
9
+ icon?: string | VNode | null;
8
10
  /** 点击跳转/交互(悬停抬升 + role=button) */
9
11
  onClick?: () => void;
10
12
  /** 数字从 0 递增动画(reduced-motion 下直接终值),仅数值类型生效 */
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * weifuwu/components — Timeline
3
3
  *
4
- * 竖向时间线:节点(状态色圆点/自定义)+ 标题 + 时间 + 内容 + 连接线。
5
- * 用于执行日志、审批历史、审计记录。
6
- * 裁剪:不做横向时间线/折叠节点(见 roadmap)。
4
+ * 时间线:节点(状态色圆点/自定义)+ 标题 + 时间 + 内容 + 连接线。
5
+ * 竖向(left/alternate)+ 横向(horizontal)。
6
+ * 用于执行日志、审批历史、审计记录、步骤进度。
7
+ * 裁剪:不做折叠节点。
7
8
  */
8
9
  import type { Component } from '../../client/vnode.ts';
9
10
  export type TimelineStatus = 'default' | 'info' | 'success' | 'warning' | 'error';
@@ -19,7 +20,7 @@ export interface TimelineItem {
19
20
  }
20
21
  export interface TimelineProps {
21
22
  items: TimelineItem[];
22
- mode?: 'left' | 'alternate';
23
+ mode?: 'left' | 'alternate' | 'horizontal';
23
24
  reverse?: boolean;
24
25
  }
25
26
  export declare const Timeline: Component<TimelineProps>;
@@ -12,7 +12,11 @@ export interface TransferProps {
12
12
  titles?: [string, string];
13
13
  size?: 'sm' | 'md' | 'lg';
14
14
  disabled?: boolean;
15
+ /** 显示搜索框(每侧独立过滤,内部态) */
16
+ showSearch?: boolean;
17
+ /** 搜索占位符 */
18
+ searchPlaceholder?: string;
15
19
  }
16
- /** 穿梭框(对应 antd/EP Transfer):双列表 + 中间穿梭按钮。
17
- * 裁剪:搜索过滤、拖拽排序、自定义渲染。 */
20
+ /** 穿梭框(对应 antd/EP Transfer):双列表 + 中间穿梭按钮 + 可选搜索。
21
+ * 裁剪:拖拽排序、自定义渲染。 */
18
22
  export declare const Transfer: Component<TransferProps>;
@@ -20,10 +20,12 @@ export interface TreeProps {
20
20
  expandOnClick?: boolean;
21
21
  checkedKeys?: string[];
22
22
  onCheck?: (keys: string[]) => void;
23
+ /** 搜索过滤(label 含 searchValue 的节点 + 祖先;自动展开匹配路径 + 高亮) */
24
+ searchValue?: string;
23
25
  className?: string;
24
26
  }
25
27
  /**
26
28
  * 树形(对应 antd/EP Tree):递归节点 + 展开/折叠 + 单选 + 勾选(父子联动 +
27
- * indeterminate 半选态)。裁剪:拖拽、异步加载、搜索过滤。
29
+ * indeterminate 半选态 + 搜索过滤 searchValue)。裁剪:拖拽、异步加载。
28
30
  */
29
31
  export declare const Tree: Component<TreeProps>;
@@ -4,7 +4,8 @@
4
4
  * 虚拟表格(数据密集场景):固定表头 + 虚拟滚动表体,10k+ 行只渲染可见窗口。
5
5
  * 复用 VirtualList 滚动基座(useScrollPosition 像素级 scrollTop + rAF 节流)。
6
6
  * 排序:受控 sortKey/sortOrder + onSort(与 Table 同款模式)。
7
- * 裁剪:行选择(rowSelection)、列虚拟化(横向)、行编辑、单元格合并、树形表格。
7
+ * 行选择:rowSelection(受控 selectedRowKeys + onChange,复选框列)。
8
+ * 裁剪:列虚拟化(横向)、行编辑、单元格合并、树形表格。
8
9
  */
9
10
  import type { Component } from '../../client/vnode.ts';
10
11
  import type { TableColumn } from '../Table/Table.ts';
@@ -27,6 +28,13 @@ export interface VirtualTableProps {
27
28
  emptyText?: string;
28
29
  /** 行点击 */
29
30
  onRowClick?: (row: any, index: number) => void;
31
+ /** 行选择配置(受控) */
32
+ rowSelection?: {
33
+ selectedRowKeys: (string | number)[];
34
+ onChange?: (selectedRowKeys: (string | number)[], selectedRows: any[]) => void;
35
+ /** 行 key 字段名,默认 'id';无该字段回退到索引 */
36
+ rowKey?: string;
37
+ };
30
38
  className?: string;
31
39
  }
32
40
  export declare const VirtualTable: Component<VirtualTableProps>;
@@ -28,7 +28,7 @@ export type { ModalProps } from './Modal/Modal.ts';
28
28
  export { Confirm, confirm } from './Confirm/Confirm.ts';
29
29
  export type { ConfirmProps, ConfirmOptions } from './Confirm/Confirm.ts';
30
30
  export { Toast, toast } from './Toast/Toast.ts';
31
- export type { ToastProps, ToastItem, ToastType, ToastPosition, ToastOptions } from './Toast/Toast.ts';
31
+ export type { ToastProps, ToastItem, ToastType, ToastPosition, ToastOptions, ToastInjected } from './Toast/Toast.ts';
32
32
  export { Alert } from './Alert/Alert.ts';
33
33
  export type { AlertProps, AlertVariant } from './Alert/Alert.ts';
34
34
  export { Loading } from './Loading/Loading.ts';