Expand description
素材上传 modal(素材管理页内上传)。 素材上传 modal(素材管理页内上传)。
UI 外壳(遮罩/面板/关闭动效经 crate::components::ui::ModalShell,逐文件状态列表
在此渲染);上传状态机、worker 池并发调度与校验规则见
crate::components::assets::upload_pool。
Esc 关闭由 ModalShell 负责(显示期间监听 keydown);粘贴监听挂在 window 上,
只在 mount 注册一次、on_cleanup 移除,handler 内用 get_untracked 守卫——
modal 关闭后粘贴绝不触发上传。无文件的文本粘贴不拦截(不 prevent_default),
搜索框等正常粘贴不受影响。
组件始终挂载(visible 只控制渲染早退),上传中途允许关闭弹窗:worker 与
signals 随组件实例存活,后台续传,每批(一次拖拽/选择/粘贴)收尾时 ≥1 个成功仍照常
回调 on_uploaded;组件卸载时 worker 池释放文件句柄并停止。
Structs§
- Asset
Upload Modal Props - Props for the
AssetUploadModalcomponent. - Upload
Drop 🔒Zone Content Props - Props for the
UploadDropZoneContentcomponent. - Upload
Footer 🔒Props - Props for the
UploadFootercomponent. - Upload
Panel 🔒Props - Props for the
UploadPanelcomponent. - Upload
RowProps 🔒 - Props for the
UploadRowcomponent. - Upload
Rows 🔒Props - Props for the
UploadRowscomponent.
Functions§
- Asset
Upload Modal - 素材上传 modal。
- Upload
Drop 🔒Zone Content - 拖放区的内容(图标 + 标题 + 提示),文案可由图鉴预览覆盖。
- Upload
Footer 🔒 - 底栏:完成、上传中与失败张数,「完成」关闭弹窗。
- Upload
Panel 🔒 - 上传面板主体:
children(拖放区)在上,逐文件状态列表在下。 - Upload
Row 🔒 - 单行:名称 / 大小固定,状态随
items中同 id 条目更新。 - Upload
Rows 🔒 - 逐文件状态列表;空列表不渲染
<ul>。 - upload_
summary 🔒 - 「1 张完成 · 1 张上传中 · 1 张失败」;没有文件时给出操作提示。