@sia.soul/sia-react-ui 0.1.62 → 0.1.64
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/{chunk-F4XMRO6G.js → chunk-B42RCR7O.js} +1300 -1198
- package/dist/{chunk-QJH7H3CB.js → chunk-NKSPPR2A.js} +11 -5
- package/dist/{chunk-7CAQPLKC.js → chunk-VGIGEDUP.js} +1 -1
- package/dist/{core-BrQetGru.d.ts → core-DrNZuMER.d.ts} +31 -10
- package/dist/{core-MTKdBVk3.d.cts → core-hpkUd4EO.d.cts} +31 -10
- package/dist/core.cjs +1239 -1235
- package/dist/core.css +158 -2
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +2 -2
- package/dist/index.cjs +959 -848
- package/dist/index.css +158 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -3
- package/dist/select-date-range.js +2 -2
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
Popover,
|
|
6
6
|
Tooltip,
|
|
7
7
|
useOverlayLifecycle
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-B42RCR7O.js";
|
|
9
9
|
import {
|
|
10
10
|
Dropdown,
|
|
11
11
|
Icon
|
|
@@ -92,6 +92,7 @@ function Toolbar({ items, onAction, disabled = false, size = "small", variant =
|
|
|
92
92
|
import { useState as useState2 } from "react";
|
|
93
93
|
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
94
94
|
function Card({
|
|
95
|
+
bordered = true,
|
|
95
96
|
title,
|
|
96
97
|
description,
|
|
97
98
|
extra,
|
|
@@ -143,7 +144,7 @@ function Card({
|
|
|
143
144
|
return /* @__PURE__ */ jsxs2(
|
|
144
145
|
"section",
|
|
145
146
|
{
|
|
146
|
-
className: `sia-card${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
|
|
147
|
+
className: `sia-card${!bordered ? " sia-card--borderless" : ""}${isCollapsed ? " sia-card--collapsed" : ""}${selectable ? " sia-card--selectable" : ""}${selectable && isSelected ? " sia-card--selected" : ""}${hoverActions ? " sia-card--hover-actions" : ""} ${className}`.trim(),
|
|
147
148
|
style: mergedStyle,
|
|
148
149
|
role: selectable ? "checkbox" : void 0,
|
|
149
150
|
"aria-checked": selectable ? isSelected : void 0,
|
|
@@ -1418,7 +1419,7 @@ function UploadItem({ file, files, props, actions }) {
|
|
|
1418
1419
|
}
|
|
1419
1420
|
useEffect4(() => setFailed(false), [source]);
|
|
1420
1421
|
const node = /* @__PURE__ */ jsxs8("div", { className: `sia-upload__item sia-upload__item--${file.status ?? "ready"}`, children: [
|
|
1421
|
-
props.listType !== "text" ? /* @__PURE__ */ jsx8(Button, { variant: "text", className: "sia-upload__thumbnail", "aria-label": `\u9884\u89C8\u7F29\u7565\u56FE ${file.name}`, onClick: actions.preview, disabled: !canPreview, children: source && !failed ? /* @__PURE__ */ jsx8("img", { src: source, alt: file.name, onError: () => setFailed(true) }) : /* @__PURE__ */ jsx8(Icon, { name: file.type?.startsWith("image/") ? "image" : "file", size: 28 }) }) : /* @__PURE__ */ jsx8(Icon, { name: file.status === "done" ? "circle-check" : "file", size:
|
|
1422
|
+
props.listType !== "text" ? /* @__PURE__ */ jsx8(Button, { variant: "text", className: "sia-upload__thumbnail", "aria-label": `\u9884\u89C8\u7F29\u7565\u56FE ${file.name}`, onClick: actions.preview, disabled: !canPreview, children: source && !failed ? /* @__PURE__ */ jsx8("img", { src: source, alt: file.name, onError: () => setFailed(true) }) : /* @__PURE__ */ jsx8(Icon, { name: file.type?.startsWith("image/") ? "image" : "file", size: 28 }) }) : /* @__PURE__ */ jsx8("span", { className: "sia-upload__file-icon", children: /* @__PURE__ */ jsx8(Icon, { name: file.status === "done" ? "circle-check" : "file", size: 24 }) }),
|
|
1422
1423
|
/* @__PURE__ */ jsx8("span", { className: "sia-upload__name", ...withTitleTooltip({ title: file.relativePath || file.name }), children: file.url ? /* @__PURE__ */ jsx8("a", { href: file.url, target: "_blank", rel: "noreferrer", children: file.name }) : file.name }),
|
|
1423
1424
|
/* @__PURE__ */ jsxs8("span", { className: "sia-upload__actions", children: [
|
|
1424
1425
|
/* @__PURE__ */ jsx8(Button, { variant: "text", title: "\u9884\u89C8", "aria-label": `\u9884\u89C8 ${file.name}`, disabled: !canPreview, onClick: actions.preview, children: /* @__PURE__ */ jsx8(Icon, { name: "eye", size: 14 }) }),
|
|
@@ -1433,7 +1434,8 @@ function UploadItem({ file, files, props, actions }) {
|
|
|
1433
1434
|
] }),
|
|
1434
1435
|
/* @__PURE__ */ jsx8("span", { className: "sia-upload__progress", role: "progressbar", "aria-label": `${file.name} \u4E0A\u4F20\u8FDB\u5EA6`, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": file.percent ?? 0, children: /* @__PURE__ */ jsx8("span", { style: { width: `${file.percent ?? 0}%` } }) })
|
|
1435
1436
|
] }),
|
|
1436
|
-
file.status === "error" && /* @__PURE__ */ jsx8("span", { className: "sia-upload__error", children: "\u4E0A\u4F20\u5931\u8D25" })
|
|
1437
|
+
file.status === "error" && /* @__PURE__ */ jsx8("span", { className: "sia-upload__error", children: "\u4E0A\u4F20\u5931\u8D25" }),
|
|
1438
|
+
props.listType === "text" && (file.status === void 0 || file.status === "ready" || file.status === "done") && /* @__PURE__ */ jsx8("span", { className: "sia-upload__status", children: file.status === "done" ? "\u4E0A\u4F20\u5B8C\u6210" : "\u5DF2\u9009\u62E9" })
|
|
1437
1439
|
] });
|
|
1438
1440
|
return /* @__PURE__ */ jsx8(Fragment4, { children: props.itemRender ? props.itemRender(node, file, files, actions) : node });
|
|
1439
1441
|
}
|
|
@@ -1712,6 +1714,10 @@ var UploadRoot = forwardRef(function UploadRoot2({
|
|
|
1712
1714
|
}
|
|
1713
1715
|
),
|
|
1714
1716
|
listType !== "picture-card" && trigger,
|
|
1717
|
+
showUploadList && listType === "text" && files.length > 0 && /* @__PURE__ */ jsxs8("div", { className: "sia-upload__list-heading", role: "status", children: [
|
|
1718
|
+
"\u5DF2\u9009\u6587\u4EF6 ",
|
|
1719
|
+
/* @__PURE__ */ jsx8("span", { className: "sia-upload__count", children: files.length })
|
|
1720
|
+
] }),
|
|
1715
1721
|
/* @__PURE__ */ jsxs8("div", { className: "sia-upload__list", children: [
|
|
1716
1722
|
showUploadList && files.map((file) => /* @__PURE__ */ jsx8(UploadItem, { file, files, props: { listType, disabled, itemRender, onPreview, downloadRequest, accept }, actions: {
|
|
1717
1723
|
upload: () => start(file),
|
|
@@ -1750,7 +1756,7 @@ var UploadDragger = forwardRef(function UploadDragger2({ hint = "\u652F\u6301\u5
|
|
|
1750
1756
|
] }) });
|
|
1751
1757
|
});
|
|
1752
1758
|
var Upload = Object.assign(UploadRoot, {
|
|
1753
|
-
/** 可点击、键盘操作和拖拽的上传区域,ref
|
|
1759
|
+
/** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除;默认内容在文字或图片列表非空且可见时收紧高度,清空后恢复。 */
|
|
1754
1760
|
Dragger: UploadDragger,
|
|
1755
1761
|
/** beforeUpload 返回时移除该文件,不进行上传。 */
|
|
1756
1762
|
LIST_IGNORE
|
|
@@ -46,6 +46,12 @@ declare function Toolbar({ items, onAction, disabled, size, variant, overflowLab
|
|
|
46
46
|
type CardAccent = "primary" | "success" | "warning" | "error";
|
|
47
47
|
/** 卡片的属性配置。 */
|
|
48
48
|
interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
49
|
+
/**
|
|
50
|
+
* 是否显示外边框并保留默认内部留白。false 移除外边框、选中描边、标题区左右留白及说明、正文、悬浮操作区的内边距;保留背景、圆角、内部分割线和键盘焦点提示。
|
|
51
|
+
* 无边框时仍可通过 bodyStyle.padding 自定义正文内边距。
|
|
52
|
+
* @defaultValue true
|
|
53
|
+
*/
|
|
54
|
+
bordered?: boolean;
|
|
49
55
|
/** 标题内容,可传入文本或 React 节点。 */
|
|
50
56
|
title?: ReactNode;
|
|
51
57
|
/** 补充说明内容。 */
|
|
@@ -60,7 +66,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
|
60
66
|
/** 受控选中状态,需在 onSelectedChange 中更新。 */
|
|
61
67
|
selected?: boolean;
|
|
62
68
|
/**
|
|
63
|
-
* 是否显示选中卡片右上角的三角勾选标记。仅在 selectable 且已选中时生效;false
|
|
69
|
+
* 是否显示选中卡片右上角的三角勾选标记。仅在 selectable 且已选中时生效;false 保留键盘交互,选中边框仅在 bordered 为 true 时显示。
|
|
64
70
|
* @defaultValue true
|
|
65
71
|
*/
|
|
66
72
|
showSelectedIndicator?: boolean;
|
|
@@ -103,11 +109,11 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
|
103
109
|
* @defaultValue ""
|
|
104
110
|
*/
|
|
105
111
|
bodyClassName?: string;
|
|
106
|
-
/**
|
|
112
|
+
/** 内容区域的内联样式,可覆盖默认内边距:上下 6px,左右使用 --sia-spacing;bordered 为 false 时默认内边距为 0。 */
|
|
107
113
|
bodyStyle?: CSSProperties;
|
|
108
114
|
}
|
|
109
115
|
/** 卡片组件。 */
|
|
110
|
-
declare function Card({ title, description, extra, selectable, selected, showSelectedIndicator, defaultSelected, disabled, onSelectedChange, hoverActions, accent, accentColor, collapsible, collapsed, defaultCollapsed, onCollapsedChange, bodyHeight, bodyClassName, bodyStyle, className, style, children, onClick, onKeyDown, ...props }: CardProps): react.JSX.Element;
|
|
116
|
+
declare function Card({ bordered, title, description, extra, selectable, selected, showSelectedIndicator, defaultSelected, disabled, onSelectedChange, hoverActions, accent, accentColor, collapsible, collapsed, defaultCollapsed, onCollapsedChange, bodyHeight, bodyClassName, bodyStyle, className, style, children, onClick, onKeyDown, ...props }: CardProps): react.JSX.Element;
|
|
111
117
|
|
|
112
118
|
declare const iconPaths: {
|
|
113
119
|
"notepad-file": react.JSX.Element;
|
|
@@ -1013,7 +1019,7 @@ interface TreeNode {
|
|
|
1013
1019
|
children?: readonly TreeNode[];
|
|
1014
1020
|
[key: string]: unknown;
|
|
1015
1021
|
}
|
|
1016
|
-
/**
|
|
1022
|
+
/** 树的属性配置;通过 style 或 className 设置高度限制及 overflow: auto 后,溢出内容使用不占布局空间的浮动滚动条。 */
|
|
1017
1023
|
interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "onDrop"> {
|
|
1018
1024
|
/** 树形节点数据 */
|
|
1019
1025
|
treeData: readonly TreeNode[];
|
|
@@ -1103,6 +1109,21 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "o
|
|
|
1103
1109
|
* @defaultValue 34
|
|
1104
1110
|
*/
|
|
1105
1111
|
stickyRowHeight?: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* 是否允许组件在可见节点达到阈值且自身形成滚动视口时自动启用虚拟滚动;关闭后始终渲染全部已展开节点。
|
|
1114
|
+
* @defaultValue true
|
|
1115
|
+
*/
|
|
1116
|
+
virtual?: boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* 自动启用虚拟滚动所需的最少可见节点数;小于该数量时保留完整 DOM,避免为小树增加额外计算。
|
|
1119
|
+
* @defaultValue 100
|
|
1120
|
+
*/
|
|
1121
|
+
virtualThreshold?: number;
|
|
1122
|
+
/**
|
|
1123
|
+
* 虚拟滚动模式下每一行的固定高度,单位为像素;未传入时使用 stickyRowHeight 的值。
|
|
1124
|
+
* @defaultValue stickyRowHeight
|
|
1125
|
+
*/
|
|
1126
|
+
virtualItemHeight?: number;
|
|
1106
1127
|
/**
|
|
1107
1128
|
* 是否允许拖拽。
|
|
1108
1129
|
* @defaultValue false
|
|
@@ -1145,8 +1166,8 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "o
|
|
|
1145
1166
|
dropPosition: TreeDropPosition;
|
|
1146
1167
|
}) => void;
|
|
1147
1168
|
}
|
|
1148
|
-
/**
|
|
1149
|
-
declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAll, checkedKeys, defaultCheckedKeys, loadingKeys, checkable, checkStrictly, multiple, selectable, showLine, showIcon, blockNode, indentSize, switcherWidth, stickyAncestors, stickyRowHeight, draggable, loadData, onSelect, onCheck, onExpand, onDrop, className, ...props }: TreeProps): react.JSX.Element;
|
|
1169
|
+
/** 树形控件,支持选择、勾选与异步加载;自身容器可滚动时默认接入浮动滚动条,无需全局 Provider。 */
|
|
1170
|
+
declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAll, checkedKeys, defaultCheckedKeys, loadingKeys, checkable, checkStrictly, multiple, selectable, showLine, showIcon, blockNode, indentSize, switcherWidth, stickyAncestors, stickyRowHeight, virtual, virtualThreshold, virtualItemHeight, draggable, loadData, onSelect, onCheck, onExpand, onDrop, className, ...props }: TreeProps): react.JSX.Element;
|
|
1150
1171
|
|
|
1151
1172
|
/** 气泡确认的属性配置。 */
|
|
1152
1173
|
interface PopconfirmProps {
|
|
@@ -1999,7 +2020,7 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
1999
2020
|
fileList?: readonly UploadFile[];
|
|
2000
2021
|
/** 非受控初始列表,后续修改不重置列表。 @defaultValue [] */
|
|
2001
2022
|
defaultFileList?: readonly UploadFile[];
|
|
2002
|
-
/** 文件列表样式:text
|
|
2023
|
+
/** 文件列表样式:text 为带文件数量标题、图标和状态的文字卡片列表,picture 为带缩略图的图片列表,picture-card 为照片墙。 @defaultValue "text" */
|
|
2003
2024
|
listType?: "text" | "picture" | "picture-card";
|
|
2004
2025
|
/** 照片墙卡片尺寸,仅 listType="picture-card" 生效;数字设置正方形,对象分别设置宽高,单位 px。默认 112×112,各边最小 48,无效数值使用默认值;宽或高小于 88px 时隐藏文件名。 */
|
|
2005
2026
|
cardSize?: number | {
|
|
@@ -2008,7 +2029,7 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
2008
2029
|
/** 卡片高度,默认 112px,最小 48px。 */
|
|
2009
2030
|
height?: number;
|
|
2010
2031
|
};
|
|
2011
|
-
/**
|
|
2032
|
+
/** 是否显示内置列表及文字列表的数量标题;隐藏时仍执行数量限制和变更通知。 @defaultValue true */
|
|
2012
2033
|
showUploadList?: boolean;
|
|
2013
2034
|
/** 启动前校验,可异步;false 保留 ready,Upload.LIST_IGNORE 移除,File 转换本次上传内容;拒绝或抛错进入 error。手动上传时在调用 upload 后执行。 */
|
|
2014
2035
|
beforeUpload?: (file: File, fileList: readonly File[]) => boolean | File | symbol | Promise<boolean | File | symbol>;
|
|
@@ -2041,9 +2062,9 @@ interface UploadDraggerProps extends UploadProps {
|
|
|
2041
2062
|
hint?: ReactNode;
|
|
2042
2063
|
}
|
|
2043
2064
|
|
|
2044
|
-
/**
|
|
2065
|
+
/** 上传组件,默认以带数量标题和状态的文字卡片展示已选文件;支持图片列表、照片墙、目录、粘贴与完全受控请求,未配置请求时仅选择文件。 */
|
|
2045
2066
|
declare const Upload: react.ForwardRefExoticComponent<UploadProps & react.RefAttributes<UploadRef>> & {
|
|
2046
|
-
/** 可点击、键盘操作和拖拽的上传区域,ref
|
|
2067
|
+
/** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除;默认内容在文字或图片列表非空且可见时收紧高度,清空后恢复。 */
|
|
2047
2068
|
Dragger: react.ForwardRefExoticComponent<UploadDraggerProps & react.RefAttributes<UploadRef>>;
|
|
2048
2069
|
/** beforeUpload 返回时移除该文件,不进行上传。 */
|
|
2049
2070
|
LIST_IGNORE: symbol;
|
|
@@ -46,6 +46,12 @@ declare function Toolbar({ items, onAction, disabled, size, variant, overflowLab
|
|
|
46
46
|
type CardAccent = "primary" | "success" | "warning" | "error";
|
|
47
47
|
/** 卡片的属性配置。 */
|
|
48
48
|
interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
49
|
+
/**
|
|
50
|
+
* 是否显示外边框并保留默认内部留白。false 移除外边框、选中描边、标题区左右留白及说明、正文、悬浮操作区的内边距;保留背景、圆角、内部分割线和键盘焦点提示。
|
|
51
|
+
* 无边框时仍可通过 bodyStyle.padding 自定义正文内边距。
|
|
52
|
+
* @defaultValue true
|
|
53
|
+
*/
|
|
54
|
+
bordered?: boolean;
|
|
49
55
|
/** 标题内容,可传入文本或 React 节点。 */
|
|
50
56
|
title?: ReactNode;
|
|
51
57
|
/** 补充说明内容。 */
|
|
@@ -60,7 +66,7 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
|
60
66
|
/** 受控选中状态,需在 onSelectedChange 中更新。 */
|
|
61
67
|
selected?: boolean;
|
|
62
68
|
/**
|
|
63
|
-
* 是否显示选中卡片右上角的三角勾选标记。仅在 selectable 且已选中时生效;false
|
|
69
|
+
* 是否显示选中卡片右上角的三角勾选标记。仅在 selectable 且已选中时生效;false 保留键盘交互,选中边框仅在 bordered 为 true 时显示。
|
|
64
70
|
* @defaultValue true
|
|
65
71
|
*/
|
|
66
72
|
showSelectedIndicator?: boolean;
|
|
@@ -103,11 +109,11 @@ interface CardProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
|
103
109
|
* @defaultValue ""
|
|
104
110
|
*/
|
|
105
111
|
bodyClassName?: string;
|
|
106
|
-
/**
|
|
112
|
+
/** 内容区域的内联样式,可覆盖默认内边距:上下 6px,左右使用 --sia-spacing;bordered 为 false 时默认内边距为 0。 */
|
|
107
113
|
bodyStyle?: CSSProperties;
|
|
108
114
|
}
|
|
109
115
|
/** 卡片组件。 */
|
|
110
|
-
declare function Card({ title, description, extra, selectable, selected, showSelectedIndicator, defaultSelected, disabled, onSelectedChange, hoverActions, accent, accentColor, collapsible, collapsed, defaultCollapsed, onCollapsedChange, bodyHeight, bodyClassName, bodyStyle, className, style, children, onClick, onKeyDown, ...props }: CardProps): react.JSX.Element;
|
|
116
|
+
declare function Card({ bordered, title, description, extra, selectable, selected, showSelectedIndicator, defaultSelected, disabled, onSelectedChange, hoverActions, accent, accentColor, collapsible, collapsed, defaultCollapsed, onCollapsedChange, bodyHeight, bodyClassName, bodyStyle, className, style, children, onClick, onKeyDown, ...props }: CardProps): react.JSX.Element;
|
|
111
117
|
|
|
112
118
|
declare const iconPaths: {
|
|
113
119
|
"notepad-file": react.JSX.Element;
|
|
@@ -1013,7 +1019,7 @@ interface TreeNode {
|
|
|
1013
1019
|
children?: readonly TreeNode[];
|
|
1014
1020
|
[key: string]: unknown;
|
|
1015
1021
|
}
|
|
1016
|
-
/**
|
|
1022
|
+
/** 树的属性配置;通过 style 或 className 设置高度限制及 overflow: auto 后,溢出内容使用不占布局空间的浮动滚动条。 */
|
|
1017
1023
|
interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "onDrop"> {
|
|
1018
1024
|
/** 树形节点数据 */
|
|
1019
1025
|
treeData: readonly TreeNode[];
|
|
@@ -1103,6 +1109,21 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "o
|
|
|
1103
1109
|
* @defaultValue 34
|
|
1104
1110
|
*/
|
|
1105
1111
|
stickyRowHeight?: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* 是否允许组件在可见节点达到阈值且自身形成滚动视口时自动启用虚拟滚动;关闭后始终渲染全部已展开节点。
|
|
1114
|
+
* @defaultValue true
|
|
1115
|
+
*/
|
|
1116
|
+
virtual?: boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* 自动启用虚拟滚动所需的最少可见节点数;小于该数量时保留完整 DOM,避免为小树增加额外计算。
|
|
1119
|
+
* @defaultValue 100
|
|
1120
|
+
*/
|
|
1121
|
+
virtualThreshold?: number;
|
|
1122
|
+
/**
|
|
1123
|
+
* 虚拟滚动模式下每一行的固定高度,单位为像素;未传入时使用 stickyRowHeight 的值。
|
|
1124
|
+
* @defaultValue stickyRowHeight
|
|
1125
|
+
*/
|
|
1126
|
+
virtualItemHeight?: number;
|
|
1106
1127
|
/**
|
|
1107
1128
|
* 是否允许拖拽。
|
|
1108
1129
|
* @defaultValue false
|
|
@@ -1145,8 +1166,8 @@ interface TreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect" | "o
|
|
|
1145
1166
|
dropPosition: TreeDropPosition;
|
|
1146
1167
|
}) => void;
|
|
1147
1168
|
}
|
|
1148
|
-
/**
|
|
1149
|
-
declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAll, checkedKeys, defaultCheckedKeys, loadingKeys, checkable, checkStrictly, multiple, selectable, showLine, showIcon, blockNode, indentSize, switcherWidth, stickyAncestors, stickyRowHeight, draggable, loadData, onSelect, onCheck, onExpand, onDrop, className, ...props }: TreeProps): react.JSX.Element;
|
|
1169
|
+
/** 树形控件,支持选择、勾选与异步加载;自身容器可滚动时默认接入浮动滚动条,无需全局 Provider。 */
|
|
1170
|
+
declare function Tree({ treeData, selectedKeys, defaultSelectedKeys, expandedKeys, defaultExpandedKeys, defaultExpandAll, checkedKeys, defaultCheckedKeys, loadingKeys, checkable, checkStrictly, multiple, selectable, showLine, showIcon, blockNode, indentSize, switcherWidth, stickyAncestors, stickyRowHeight, virtual, virtualThreshold, virtualItemHeight, draggable, loadData, onSelect, onCheck, onExpand, onDrop, className, ...props }: TreeProps): react.JSX.Element;
|
|
1150
1171
|
|
|
1151
1172
|
/** 气泡确认的属性配置。 */
|
|
1152
1173
|
interface PopconfirmProps {
|
|
@@ -1999,7 +2020,7 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
1999
2020
|
fileList?: readonly UploadFile[];
|
|
2000
2021
|
/** 非受控初始列表,后续修改不重置列表。 @defaultValue [] */
|
|
2001
2022
|
defaultFileList?: readonly UploadFile[];
|
|
2002
|
-
/** 文件列表样式:text
|
|
2023
|
+
/** 文件列表样式:text 为带文件数量标题、图标和状态的文字卡片列表,picture 为带缩略图的图片列表,picture-card 为照片墙。 @defaultValue "text" */
|
|
2003
2024
|
listType?: "text" | "picture" | "picture-card";
|
|
2004
2025
|
/** 照片墙卡片尺寸,仅 listType="picture-card" 生效;数字设置正方形,对象分别设置宽高,单位 px。默认 112×112,各边最小 48,无效数值使用默认值;宽或高小于 88px 时隐藏文件名。 */
|
|
2005
2026
|
cardSize?: number | {
|
|
@@ -2008,7 +2029,7 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
2008
2029
|
/** 卡片高度,默认 112px,最小 48px。 */
|
|
2009
2030
|
height?: number;
|
|
2010
2031
|
};
|
|
2011
|
-
/**
|
|
2032
|
+
/** 是否显示内置列表及文字列表的数量标题;隐藏时仍执行数量限制和变更通知。 @defaultValue true */
|
|
2012
2033
|
showUploadList?: boolean;
|
|
2013
2034
|
/** 启动前校验,可异步;false 保留 ready,Upload.LIST_IGNORE 移除,File 转换本次上传内容;拒绝或抛错进入 error。手动上传时在调用 upload 后执行。 */
|
|
2014
2035
|
beforeUpload?: (file: File, fileList: readonly File[]) => boolean | File | symbol | Promise<boolean | File | symbol>;
|
|
@@ -2041,9 +2062,9 @@ interface UploadDraggerProps extends UploadProps {
|
|
|
2041
2062
|
hint?: ReactNode;
|
|
2042
2063
|
}
|
|
2043
2064
|
|
|
2044
|
-
/**
|
|
2065
|
+
/** 上传组件,默认以带数量标题和状态的文字卡片展示已选文件;支持图片列表、照片墙、目录、粘贴与完全受控请求,未配置请求时仅选择文件。 */
|
|
2045
2066
|
declare const Upload: react.ForwardRefExoticComponent<UploadProps & react.RefAttributes<UploadRef>> & {
|
|
2046
|
-
/** 可点击、键盘操作和拖拽的上传区域,ref
|
|
2067
|
+
/** 可点击、键盘操作和拖拽的上传区域,ref 支持手动上传、取消及移除;默认内容在文字或图片列表非空且可见时收紧高度,清空后恢复。 */
|
|
2047
2068
|
Dragger: react.ForwardRefExoticComponent<UploadDraggerProps & react.RefAttributes<UploadRef>>;
|
|
2048
2069
|
/** beforeUpload 返回时移除该文件,不进行上传。 */
|
|
2049
2070
|
LIST_IGNORE: symbol;
|