@sia.soul/sia-react-ui 0.1.34 → 0.1.36
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-BR2SD6RD.js → chunk-6TLANQVX.js} +2 -2
- package/dist/{chunk-Z63VYNCR.js → chunk-7CPIEYS2.js} +284 -137
- package/dist/{chunk-HOU5JLNJ.js → chunk-XCVAVCIO.js} +11 -0
- package/dist/{chunk-MHUYOGCG.js → chunk-ZDC7PMZN.js} +1 -1
- package/dist/{chunk-QAVQEBIS.js → chunk-ZTJUFVJO.js} +1 -1
- package/dist/{core-CIj-Xevv.d.cts → core-CLt6U7oH.d.cts} +23 -8
- package/dist/{core-Cj9bxBwT.d.ts → core-vIHbXa6s.d.ts} +23 -8
- package/dist/core.cjs +292 -134
- package/dist/core.css +126 -30
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +3 -3
- package/dist/index.cjs +378 -220
- package/dist/index.css +126 -30
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +7 -7
- package/dist/rich-text-editor.cjs +11 -0
- package/dist/rich-text-editor.js +2 -2
- package/dist/select-date-range.cjs +11 -0
- package/dist/select-date-range.js +3 -3
- package/package.json +1 -1
|
@@ -262,6 +262,10 @@ declare const iconPaths: {
|
|
|
262
262
|
redo: react.JSX.Element;
|
|
263
263
|
"zoom-in": react.JSX.Element;
|
|
264
264
|
"zoom-out": react.JSX.Element;
|
|
265
|
+
"flip-horizontal": react.JSX.Element;
|
|
266
|
+
"flip-vertical": react.JSX.Element;
|
|
267
|
+
"rotate-left": react.JSX.Element;
|
|
268
|
+
"rotate-right": react.JSX.Element;
|
|
265
269
|
download: react.JSX.Element;
|
|
266
270
|
upload: react.JSX.Element;
|
|
267
271
|
refresh: react.JSX.Element;
|
|
@@ -298,7 +302,7 @@ declare const iconPaths: {
|
|
|
298
302
|
/** 可用的线框图标名称。 */
|
|
299
303
|
type IconName = keyof typeof iconPaths;
|
|
300
304
|
/** 可用线框图标名称集合。 */
|
|
301
|
-
declare const ICON_NAMES: readonly ("search" | "bold" | "link" | "copy" | "move" | "zoom-in" | "zoom-out" | "table" | "italic" | "underline" | "menu" | "send" | "close" | "pause" | "play" | "message" | "code" | "video" | "filter" | "image" | "stop" | "warning" | "notepad-file" | "notepad-folder" | "notepad-virtual-folder" | "step-backward" | "step-forward" | "fast-backward" | "fast-forward" | "corner-up-left" | "corner-up-right" | "swap-horizontal" | "swap-vertical" | "expand" | "shrink" | "fullscreen" | "fullscreen-exit" | "menu-fold" | "menu-unfold" | "login" | "logout" | "vertical-align-top" | "vertical-align-middle" | "vertical-align-bottom" | "square-plus" | "square-minus" | "square-check" | "square-close" | "tab-plus" | "folder-plus" | "pin" | "pin-off" | "help-circle" | "save" | "clipboard" | "clipboard-check" | "file-plus" | "file-check" | "file-warning" | "file-spreadsheet" | "align-left" | "align-center" | "align-right" | "align-justify" | "strikethrough" | "list-ordered" | "list-unordered" | "eraser" | "highlighter" | "columns" | "rows" | "bar-chart" | "line-chart" | "pie-chart" | "area-chart" | "activity" | "trending-up" | "trending-down" | "database" | "cloud" | "cloud-download" | "cloud-upload" | "server" | "desktop" | "laptop" | "mobile" | "tablet" | "printer" | "camera" | "microphone" | "volume-up" | "volume-off" | "speaker-wave" | "speaker-muted" | "wifi" | "power" | "key" | "shield" | "shield-check" | "bug" | "bulb" | "rocket" | "target" | "trophy" | "shopping-cart" | "shopping-bag" | "shop" | "wallet" | "bank" | "calculator" | "tag" | "tags" | "comments" | "share" | "paperclip" | "location" | "compass" | "car" | "truck" | "gift" | "coffee" | "experiment" | "tool" | "appstore" | "puzzle" | "partition" | "branches" | "scan" | "qr-code" | "barcode" | "user-plus" | "user-minus" | "smile" | "meh" | "frown" | "game-cultivator" | "game-swordsman" | "game-spirit-wolf" | "game-gem" | "game-ingot" | "game-sword" | "game-robe" | "game-pants" | "game-pendant" | "game-necklace" | "game-pill" | "game-potion" | "game-elixir-jar" | "game-flame" | "game-soul-elixir" | "game-herb" | "game-meditate" | "game-backpack" | "game-qi" | "plus" | "minus" | "check" | "info" | "question" | "circle-check" | "circle-close" | "circle-plus" | "circle-minus" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "double-left" | "double-right" | "arrow-left" | "arrow-right" | "arrow-up" | "arrow-down" | "more-horizontal" | "more-vertical" | "home" | "user" | "users" | "settings" | "edit" | "trash" | "scissors" | "undo" | "redo" | "download" | "upload" | "refresh" | "loader" | "calendar" | "clock" | "mail" | "phone" | "external-link" | "eye" | "eye-off" | "lock" | "unlock" | "bell" | "star" | "heart" | "file" | "folder" | "sort-ascending" | "sort-descending" | "book" | "component" | "token" | "sun" | "moon" | "github")[];
|
|
305
|
+
declare const ICON_NAMES: readonly ("search" | "bold" | "link" | "copy" | "move" | "zoom-in" | "zoom-out" | "table" | "italic" | "underline" | "menu" | "send" | "close" | "pause" | "play" | "message" | "code" | "video" | "filter" | "image" | "stop" | "warning" | "notepad-file" | "notepad-folder" | "notepad-virtual-folder" | "step-backward" | "step-forward" | "fast-backward" | "fast-forward" | "corner-up-left" | "corner-up-right" | "swap-horizontal" | "swap-vertical" | "expand" | "shrink" | "fullscreen" | "fullscreen-exit" | "menu-fold" | "menu-unfold" | "login" | "logout" | "vertical-align-top" | "vertical-align-middle" | "vertical-align-bottom" | "square-plus" | "square-minus" | "square-check" | "square-close" | "tab-plus" | "folder-plus" | "pin" | "pin-off" | "help-circle" | "save" | "clipboard" | "clipboard-check" | "file-plus" | "file-check" | "file-warning" | "file-spreadsheet" | "align-left" | "align-center" | "align-right" | "align-justify" | "strikethrough" | "list-ordered" | "list-unordered" | "eraser" | "highlighter" | "columns" | "rows" | "bar-chart" | "line-chart" | "pie-chart" | "area-chart" | "activity" | "trending-up" | "trending-down" | "database" | "cloud" | "cloud-download" | "cloud-upload" | "server" | "desktop" | "laptop" | "mobile" | "tablet" | "printer" | "camera" | "microphone" | "volume-up" | "volume-off" | "speaker-wave" | "speaker-muted" | "wifi" | "power" | "key" | "shield" | "shield-check" | "bug" | "bulb" | "rocket" | "target" | "trophy" | "shopping-cart" | "shopping-bag" | "shop" | "wallet" | "bank" | "calculator" | "tag" | "tags" | "comments" | "share" | "paperclip" | "location" | "compass" | "car" | "truck" | "gift" | "coffee" | "experiment" | "tool" | "appstore" | "puzzle" | "partition" | "branches" | "scan" | "qr-code" | "barcode" | "user-plus" | "user-minus" | "smile" | "meh" | "frown" | "game-cultivator" | "game-swordsman" | "game-spirit-wolf" | "game-gem" | "game-ingot" | "game-sword" | "game-robe" | "game-pants" | "game-pendant" | "game-necklace" | "game-pill" | "game-potion" | "game-elixir-jar" | "game-flame" | "game-soul-elixir" | "game-herb" | "game-meditate" | "game-backpack" | "game-qi" | "plus" | "minus" | "check" | "info" | "question" | "circle-check" | "circle-close" | "circle-plus" | "circle-minus" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "double-left" | "double-right" | "arrow-left" | "arrow-right" | "arrow-up" | "arrow-down" | "more-horizontal" | "more-vertical" | "home" | "user" | "users" | "settings" | "edit" | "trash" | "scissors" | "undo" | "redo" | "flip-horizontal" | "flip-vertical" | "rotate-left" | "rotate-right" | "download" | "upload" | "refresh" | "loader" | "calendar" | "clock" | "mail" | "phone" | "external-link" | "eye" | "eye-off" | "lock" | "unlock" | "bell" | "star" | "heart" | "file" | "folder" | "sort-ascending" | "sort-descending" | "book" | "component" | "token" | "sun" | "moon" | "github")[];
|
|
302
306
|
declare const filledIconPaths: {
|
|
303
307
|
info: react.JSX.Element;
|
|
304
308
|
question: react.JSX.Element;
|
|
@@ -696,7 +700,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
696
700
|
/** 是否等选中框动画结束后再切换 items[].children,等待期间保留旧面板。默认 false,立即切换;true 时配合 destroyInactiveTabPane=false 仅在首次激活后挂载并保留面板。不能延迟父组件已执行的同步计算或 onChange 中的渲染,请将外部重内容更新放到 onAfterChange。 */
|
|
697
701
|
deferContent?: boolean;
|
|
698
702
|
/**
|
|
699
|
-
*
|
|
703
|
+
* 标签样式:line 线型、card 卡片、pill 胶囊、capsule 圆角胶囊、underline 紧凑下划线、tech 科技型、tech-line 折线科技型。
|
|
700
704
|
* @defaultValue "line"
|
|
701
705
|
*/
|
|
702
706
|
type?: TabsType;
|
|
@@ -1754,7 +1758,7 @@ interface ImagePreviewProps {
|
|
|
1754
1758
|
/** 打开状态改变时触发,参数为新的打开状态。 */
|
|
1755
1759
|
onOpenChange: (open: boolean) => void;
|
|
1756
1760
|
}
|
|
1757
|
-
/**
|
|
1761
|
+
/** 图片预览弹层,初始按窗口适配大图,支持水平/垂直翻转、左右旋转、缩放及拖动;重新打开或更换图片时重置视图。 */
|
|
1758
1762
|
declare function ImagePreview({ open, src, alt, onOpenChange }: ImagePreviewProps): react.ReactPortal | null;
|
|
1759
1763
|
/** 图片预览的配置。 */
|
|
1760
1764
|
interface ImagePreviewConfig {
|
|
@@ -1838,7 +1842,7 @@ interface UploadFile {
|
|
|
1838
1842
|
status?: UploadFileStatus;
|
|
1839
1843
|
/** 上传百分比,范围 0–100。 */
|
|
1840
1844
|
percent?: number;
|
|
1841
|
-
/**
|
|
1845
|
+
/** 远程访问地址,用于预览及下载;默认下载会 fetch 为 Blob,跨域地址需要服务端允许 CORS。 */
|
|
1842
1846
|
url?: string;
|
|
1843
1847
|
/** 缩略图地址,优先于本地缩略图;预览优先使用 url。 */
|
|
1844
1848
|
thumbUrl?: string;
|
|
@@ -1920,8 +1924,10 @@ interface UploadItemActions {
|
|
|
1920
1924
|
abort: () => void;
|
|
1921
1925
|
/** 请求移除,等待 onRemove 允许后取消并删除。 */
|
|
1922
1926
|
remove: () => Promise<void>;
|
|
1923
|
-
/** 触发自定义 onPreview
|
|
1927
|
+
/** 触发自定义 onPreview;默认图片使用框架预览,其他文件在新标签页交给浏览器查看。 */
|
|
1924
1928
|
preview: () => void;
|
|
1929
|
+
/** 获取文件 Blob 并按文件名触发浏览器下载,不打开新标签页;优先 downloadRequest,其次 url,最后 originFileObj。失败时 Promise 拒绝,自定义列表需自行处理。 */
|
|
1930
|
+
download: () => Promise<void>;
|
|
1925
1931
|
}
|
|
1926
1932
|
/** Upload 的命令式句柄,适用于手动上传及业务工具栏。 */
|
|
1927
1933
|
interface UploadRef {
|
|
@@ -1954,8 +1960,15 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
1954
1960
|
fileList?: readonly UploadFile[];
|
|
1955
1961
|
/** 非受控初始列表,后续修改不重置列表。 @defaultValue [] */
|
|
1956
1962
|
defaultFileList?: readonly UploadFile[];
|
|
1957
|
-
/** text
|
|
1963
|
+
/** 文件列表样式:text 为文字列表,picture 为带缩略图的图片列表,picture-card 为照片墙。 @defaultValue "text" */
|
|
1958
1964
|
listType?: "text" | "picture" | "picture-card";
|
|
1965
|
+
/** 照片墙卡片尺寸,仅 listType="picture-card" 生效;数字设置正方形,对象分别设置宽高,单位 px。默认 112×112,各边最小 48,无效数值使用默认值;宽或高小于 88px 时隐藏文件名。 */
|
|
1966
|
+
cardSize?: number | {
|
|
1967
|
+
/** 卡片宽度,默认 112px,最小 48px。 */
|
|
1968
|
+
width?: number;
|
|
1969
|
+
/** 卡片高度,默认 112px,最小 48px。 */
|
|
1970
|
+
height?: number;
|
|
1971
|
+
};
|
|
1959
1972
|
/** 是否显示列表;隐藏时仍执行数量限制和变更通知。 @defaultValue true */
|
|
1960
1973
|
showUploadList?: boolean;
|
|
1961
1974
|
/** 启动前校验,可异步;false 保留 ready,Upload.LIST_IGNORE 移除,File 转换本次上传内容;拒绝或抛错进入 error。手动上传时在调用 upload 后执行。 */
|
|
@@ -1972,8 +1985,10 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
1972
1985
|
onReject?: (info: UploadRejectInfo) => void;
|
|
1973
1986
|
/** 拖拽目录读取失败时调用,本次批次不上传。 */
|
|
1974
1987
|
onReadError?: (error: unknown) => void;
|
|
1975
|
-
/**
|
|
1988
|
+
/** 点击预览时调用,提供后完全接管预览;默认图片使用框架预览,其他文件在新标签页交给浏览器查看,不支持的格式由浏览器处理。 */
|
|
1976
1989
|
onPreview?: (file: UploadFile) => void;
|
|
1990
|
+
/** 点击下载时获取实际文件内容,返回 Blob 或 Promise<Blob>,可用于鉴权请求、OSS 签名或代理接口;组件仍负责按 file.name 触发浏览器下载。未提供时 fetch(file.url),无 url 时使用 originFileObj;跨域请求需允许 CORS。抛错或拒绝时默认列表显示失败消息,不回退到打开新标签页。 */
|
|
1991
|
+
downloadRequest?: (file: UploadFile) => Blob | Promise<Blob>;
|
|
1977
1992
|
/** 完全自定义列表项;接收默认节点、记录、最新列表及操作句柄,应自行提供可访问的按钮。 */
|
|
1978
1993
|
itemRender?: (node: ReactNode, file: UploadFile, fileList: readonly UploadFile[], actions: UploadItemActions) => ReactNode;
|
|
1979
1994
|
/** 上传按钮内容,不应嵌套其他交互控件;外层负责点击和键盘操作。 */
|
|
@@ -2003,7 +2018,7 @@ interface MessageConfig {
|
|
|
2003
2018
|
key?: MessageKey;
|
|
2004
2019
|
/** 类型标识,用于选择对应的表现形式。 */
|
|
2005
2020
|
type?: MessageType;
|
|
2006
|
-
/**
|
|
2021
|
+
/** 消息正文,支持文本或 React 节点。 */
|
|
2007
2022
|
content: ReactNode;
|
|
2008
2023
|
/** 自动关闭延迟,单位为秒;0 表示不自动关闭。 */
|
|
2009
2024
|
duration?: number;
|
|
@@ -262,6 +262,10 @@ declare const iconPaths: {
|
|
|
262
262
|
redo: react.JSX.Element;
|
|
263
263
|
"zoom-in": react.JSX.Element;
|
|
264
264
|
"zoom-out": react.JSX.Element;
|
|
265
|
+
"flip-horizontal": react.JSX.Element;
|
|
266
|
+
"flip-vertical": react.JSX.Element;
|
|
267
|
+
"rotate-left": react.JSX.Element;
|
|
268
|
+
"rotate-right": react.JSX.Element;
|
|
265
269
|
download: react.JSX.Element;
|
|
266
270
|
upload: react.JSX.Element;
|
|
267
271
|
refresh: react.JSX.Element;
|
|
@@ -298,7 +302,7 @@ declare const iconPaths: {
|
|
|
298
302
|
/** 可用的线框图标名称。 */
|
|
299
303
|
type IconName = keyof typeof iconPaths;
|
|
300
304
|
/** 可用线框图标名称集合。 */
|
|
301
|
-
declare const ICON_NAMES: readonly ("search" | "bold" | "link" | "copy" | "move" | "zoom-in" | "zoom-out" | "table" | "italic" | "underline" | "menu" | "send" | "close" | "pause" | "play" | "message" | "code" | "video" | "filter" | "image" | "stop" | "warning" | "notepad-file" | "notepad-folder" | "notepad-virtual-folder" | "step-backward" | "step-forward" | "fast-backward" | "fast-forward" | "corner-up-left" | "corner-up-right" | "swap-horizontal" | "swap-vertical" | "expand" | "shrink" | "fullscreen" | "fullscreen-exit" | "menu-fold" | "menu-unfold" | "login" | "logout" | "vertical-align-top" | "vertical-align-middle" | "vertical-align-bottom" | "square-plus" | "square-minus" | "square-check" | "square-close" | "tab-plus" | "folder-plus" | "pin" | "pin-off" | "help-circle" | "save" | "clipboard" | "clipboard-check" | "file-plus" | "file-check" | "file-warning" | "file-spreadsheet" | "align-left" | "align-center" | "align-right" | "align-justify" | "strikethrough" | "list-ordered" | "list-unordered" | "eraser" | "highlighter" | "columns" | "rows" | "bar-chart" | "line-chart" | "pie-chart" | "area-chart" | "activity" | "trending-up" | "trending-down" | "database" | "cloud" | "cloud-download" | "cloud-upload" | "server" | "desktop" | "laptop" | "mobile" | "tablet" | "printer" | "camera" | "microphone" | "volume-up" | "volume-off" | "speaker-wave" | "speaker-muted" | "wifi" | "power" | "key" | "shield" | "shield-check" | "bug" | "bulb" | "rocket" | "target" | "trophy" | "shopping-cart" | "shopping-bag" | "shop" | "wallet" | "bank" | "calculator" | "tag" | "tags" | "comments" | "share" | "paperclip" | "location" | "compass" | "car" | "truck" | "gift" | "coffee" | "experiment" | "tool" | "appstore" | "puzzle" | "partition" | "branches" | "scan" | "qr-code" | "barcode" | "user-plus" | "user-minus" | "smile" | "meh" | "frown" | "game-cultivator" | "game-swordsman" | "game-spirit-wolf" | "game-gem" | "game-ingot" | "game-sword" | "game-robe" | "game-pants" | "game-pendant" | "game-necklace" | "game-pill" | "game-potion" | "game-elixir-jar" | "game-flame" | "game-soul-elixir" | "game-herb" | "game-meditate" | "game-backpack" | "game-qi" | "plus" | "minus" | "check" | "info" | "question" | "circle-check" | "circle-close" | "circle-plus" | "circle-minus" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "double-left" | "double-right" | "arrow-left" | "arrow-right" | "arrow-up" | "arrow-down" | "more-horizontal" | "more-vertical" | "home" | "user" | "users" | "settings" | "edit" | "trash" | "scissors" | "undo" | "redo" | "download" | "upload" | "refresh" | "loader" | "calendar" | "clock" | "mail" | "phone" | "external-link" | "eye" | "eye-off" | "lock" | "unlock" | "bell" | "star" | "heart" | "file" | "folder" | "sort-ascending" | "sort-descending" | "book" | "component" | "token" | "sun" | "moon" | "github")[];
|
|
305
|
+
declare const ICON_NAMES: readonly ("search" | "bold" | "link" | "copy" | "move" | "zoom-in" | "zoom-out" | "table" | "italic" | "underline" | "menu" | "send" | "close" | "pause" | "play" | "message" | "code" | "video" | "filter" | "image" | "stop" | "warning" | "notepad-file" | "notepad-folder" | "notepad-virtual-folder" | "step-backward" | "step-forward" | "fast-backward" | "fast-forward" | "corner-up-left" | "corner-up-right" | "swap-horizontal" | "swap-vertical" | "expand" | "shrink" | "fullscreen" | "fullscreen-exit" | "menu-fold" | "menu-unfold" | "login" | "logout" | "vertical-align-top" | "vertical-align-middle" | "vertical-align-bottom" | "square-plus" | "square-minus" | "square-check" | "square-close" | "tab-plus" | "folder-plus" | "pin" | "pin-off" | "help-circle" | "save" | "clipboard" | "clipboard-check" | "file-plus" | "file-check" | "file-warning" | "file-spreadsheet" | "align-left" | "align-center" | "align-right" | "align-justify" | "strikethrough" | "list-ordered" | "list-unordered" | "eraser" | "highlighter" | "columns" | "rows" | "bar-chart" | "line-chart" | "pie-chart" | "area-chart" | "activity" | "trending-up" | "trending-down" | "database" | "cloud" | "cloud-download" | "cloud-upload" | "server" | "desktop" | "laptop" | "mobile" | "tablet" | "printer" | "camera" | "microphone" | "volume-up" | "volume-off" | "speaker-wave" | "speaker-muted" | "wifi" | "power" | "key" | "shield" | "shield-check" | "bug" | "bulb" | "rocket" | "target" | "trophy" | "shopping-cart" | "shopping-bag" | "shop" | "wallet" | "bank" | "calculator" | "tag" | "tags" | "comments" | "share" | "paperclip" | "location" | "compass" | "car" | "truck" | "gift" | "coffee" | "experiment" | "tool" | "appstore" | "puzzle" | "partition" | "branches" | "scan" | "qr-code" | "barcode" | "user-plus" | "user-minus" | "smile" | "meh" | "frown" | "game-cultivator" | "game-swordsman" | "game-spirit-wolf" | "game-gem" | "game-ingot" | "game-sword" | "game-robe" | "game-pants" | "game-pendant" | "game-necklace" | "game-pill" | "game-potion" | "game-elixir-jar" | "game-flame" | "game-soul-elixir" | "game-herb" | "game-meditate" | "game-backpack" | "game-qi" | "plus" | "minus" | "check" | "info" | "question" | "circle-check" | "circle-close" | "circle-plus" | "circle-minus" | "chevron-left" | "chevron-right" | "chevron-up" | "chevron-down" | "double-left" | "double-right" | "arrow-left" | "arrow-right" | "arrow-up" | "arrow-down" | "more-horizontal" | "more-vertical" | "home" | "user" | "users" | "settings" | "edit" | "trash" | "scissors" | "undo" | "redo" | "flip-horizontal" | "flip-vertical" | "rotate-left" | "rotate-right" | "download" | "upload" | "refresh" | "loader" | "calendar" | "clock" | "mail" | "phone" | "external-link" | "eye" | "eye-off" | "lock" | "unlock" | "bell" | "star" | "heart" | "file" | "folder" | "sort-ascending" | "sort-descending" | "book" | "component" | "token" | "sun" | "moon" | "github")[];
|
|
302
306
|
declare const filledIconPaths: {
|
|
303
307
|
info: react.JSX.Element;
|
|
304
308
|
question: react.JSX.Element;
|
|
@@ -696,7 +700,7 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
|
696
700
|
/** 是否等选中框动画结束后再切换 items[].children,等待期间保留旧面板。默认 false,立即切换;true 时配合 destroyInactiveTabPane=false 仅在首次激活后挂载并保留面板。不能延迟父组件已执行的同步计算或 onChange 中的渲染,请将外部重内容更新放到 onAfterChange。 */
|
|
697
701
|
deferContent?: boolean;
|
|
698
702
|
/**
|
|
699
|
-
*
|
|
703
|
+
* 标签样式:line 线型、card 卡片、pill 胶囊、capsule 圆角胶囊、underline 紧凑下划线、tech 科技型、tech-line 折线科技型。
|
|
700
704
|
* @defaultValue "line"
|
|
701
705
|
*/
|
|
702
706
|
type?: TabsType;
|
|
@@ -1754,7 +1758,7 @@ interface ImagePreviewProps {
|
|
|
1754
1758
|
/** 打开状态改变时触发,参数为新的打开状态。 */
|
|
1755
1759
|
onOpenChange: (open: boolean) => void;
|
|
1756
1760
|
}
|
|
1757
|
-
/**
|
|
1761
|
+
/** 图片预览弹层,初始按窗口适配大图,支持水平/垂直翻转、左右旋转、缩放及拖动;重新打开或更换图片时重置视图。 */
|
|
1758
1762
|
declare function ImagePreview({ open, src, alt, onOpenChange }: ImagePreviewProps): react.ReactPortal | null;
|
|
1759
1763
|
/** 图片预览的配置。 */
|
|
1760
1764
|
interface ImagePreviewConfig {
|
|
@@ -1838,7 +1842,7 @@ interface UploadFile {
|
|
|
1838
1842
|
status?: UploadFileStatus;
|
|
1839
1843
|
/** 上传百分比,范围 0–100。 */
|
|
1840
1844
|
percent?: number;
|
|
1841
|
-
/**
|
|
1845
|
+
/** 远程访问地址,用于预览及下载;默认下载会 fetch 为 Blob,跨域地址需要服务端允许 CORS。 */
|
|
1842
1846
|
url?: string;
|
|
1843
1847
|
/** 缩略图地址,优先于本地缩略图;预览优先使用 url。 */
|
|
1844
1848
|
thumbUrl?: string;
|
|
@@ -1920,8 +1924,10 @@ interface UploadItemActions {
|
|
|
1920
1924
|
abort: () => void;
|
|
1921
1925
|
/** 请求移除,等待 onRemove 允许后取消并删除。 */
|
|
1922
1926
|
remove: () => Promise<void>;
|
|
1923
|
-
/** 触发自定义 onPreview
|
|
1927
|
+
/** 触发自定义 onPreview;默认图片使用框架预览,其他文件在新标签页交给浏览器查看。 */
|
|
1924
1928
|
preview: () => void;
|
|
1929
|
+
/** 获取文件 Blob 并按文件名触发浏览器下载,不打开新标签页;优先 downloadRequest,其次 url,最后 originFileObj。失败时 Promise 拒绝,自定义列表需自行处理。 */
|
|
1930
|
+
download: () => Promise<void>;
|
|
1925
1931
|
}
|
|
1926
1932
|
/** Upload 的命令式句柄,适用于手动上传及业务工具栏。 */
|
|
1927
1933
|
interface UploadRef {
|
|
@@ -1954,8 +1960,15 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
1954
1960
|
fileList?: readonly UploadFile[];
|
|
1955
1961
|
/** 非受控初始列表,后续修改不重置列表。 @defaultValue [] */
|
|
1956
1962
|
defaultFileList?: readonly UploadFile[];
|
|
1957
|
-
/** text
|
|
1963
|
+
/** 文件列表样式:text 为文字列表,picture 为带缩略图的图片列表,picture-card 为照片墙。 @defaultValue "text" */
|
|
1958
1964
|
listType?: "text" | "picture" | "picture-card";
|
|
1965
|
+
/** 照片墙卡片尺寸,仅 listType="picture-card" 生效;数字设置正方形,对象分别设置宽高,单位 px。默认 112×112,各边最小 48,无效数值使用默认值;宽或高小于 88px 时隐藏文件名。 */
|
|
1966
|
+
cardSize?: number | {
|
|
1967
|
+
/** 卡片宽度,默认 112px,最小 48px。 */
|
|
1968
|
+
width?: number;
|
|
1969
|
+
/** 卡片高度,默认 112px,最小 48px。 */
|
|
1970
|
+
height?: number;
|
|
1971
|
+
};
|
|
1959
1972
|
/** 是否显示列表;隐藏时仍执行数量限制和变更通知。 @defaultValue true */
|
|
1960
1973
|
showUploadList?: boolean;
|
|
1961
1974
|
/** 启动前校验,可异步;false 保留 ready,Upload.LIST_IGNORE 移除,File 转换本次上传内容;拒绝或抛错进入 error。手动上传时在调用 upload 后执行。 */
|
|
@@ -1972,8 +1985,10 @@ interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
|
|
|
1972
1985
|
onReject?: (info: UploadRejectInfo) => void;
|
|
1973
1986
|
/** 拖拽目录读取失败时调用,本次批次不上传。 */
|
|
1974
1987
|
onReadError?: (error: unknown) => void;
|
|
1975
|
-
/**
|
|
1988
|
+
/** 点击预览时调用,提供后完全接管预览;默认图片使用框架预览,其他文件在新标签页交给浏览器查看,不支持的格式由浏览器处理。 */
|
|
1976
1989
|
onPreview?: (file: UploadFile) => void;
|
|
1990
|
+
/** 点击下载时获取实际文件内容,返回 Blob 或 Promise<Blob>,可用于鉴权请求、OSS 签名或代理接口;组件仍负责按 file.name 触发浏览器下载。未提供时 fetch(file.url),无 url 时使用 originFileObj;跨域请求需允许 CORS。抛错或拒绝时默认列表显示失败消息,不回退到打开新标签页。 */
|
|
1991
|
+
downloadRequest?: (file: UploadFile) => Blob | Promise<Blob>;
|
|
1977
1992
|
/** 完全自定义列表项;接收默认节点、记录、最新列表及操作句柄,应自行提供可访问的按钮。 */
|
|
1978
1993
|
itemRender?: (node: ReactNode, file: UploadFile, fileList: readonly UploadFile[], actions: UploadItemActions) => ReactNode;
|
|
1979
1994
|
/** 上传按钮内容,不应嵌套其他交互控件;外层负责点击和键盘操作。 */
|
|
@@ -2003,7 +2018,7 @@ interface MessageConfig {
|
|
|
2003
2018
|
key?: MessageKey;
|
|
2004
2019
|
/** 类型标识,用于选择对应的表现形式。 */
|
|
2005
2020
|
type?: MessageType;
|
|
2006
|
-
/**
|
|
2021
|
+
/** 消息正文,支持文本或 React 节点。 */
|
|
2007
2022
|
content: ReactNode;
|
|
2008
2023
|
/** 自动关闭延迟,单位为秒;0 表示不自动关闭。 */
|
|
2009
2024
|
duration?: number;
|