Expand description
素材选择 modal(封面上「从素材库选择」)。 素材选择 modal(封面/头像「从素材库选择」、正文编辑器「素材库」插图共用)。
网格展示素材库(默认最新排序,支持文件名/alt 搜索)。
单选模式(默认):单击选中即回填并关闭,供封面/头像使用。
多选模式(multi: true,正文插图):单击切换勾选态(跨页/搜索保留),
底部确认栏按勾选顺序批量回填。
内嵌「上传新图」入口(复用 upload_image_file),上传成功后留在网格中供用户选择
(多选模式下自动加入选中集——上传即意图)。
纯 Leptos 组件,不触碰 Tiptap;数据加载仅在浏览器端(Effect)发生。
Structs§
- Asset
Picker Modal Props - Props for the
AssetPickerModalcomponent. - Asset
Selection - 素材选中载荷:
on_select的回传单元。 - Picker
Asset - Grid data shared by the authenticated picker and the local showcase.
- Picker
Gallery 🔒Props - Props for the
PickerGallerycomponent. - Picker
Item 🔒Props - Props for the
PickerItemcomponent. - Picker
Selection 🔒Footer Props - Props for the
PickerSelectionFootercomponent.
Constants§
- ASSETS_
PER_ 🔒PAGE - 每页素材数,与素材管理页及服务端列表接口保持一致。
- SEARCH_
DEBOUNCE_ 🔒MS - 搜索输入防抖窗口,复用素材管理页的请求节流约定。
Functions§
- Asset
Picker Modal - 素材选择 modal。
- Picker
Gallery 🔒 - The actual picker grid is shared; callers provide already loaded display rows.
- Picker
Item 🔒 - 网格中的单个素材:单选点击即回填,多选点击切换勾选并显示勾选序号。
- Picker
Selection 🔒Footer - 多选模式底栏:已选计数、清空与确认插入。
- prepend_
uploaded_ 🔒asset - toggle_
selection 🔒 - 切换素材勾选态:已选(按 URL 判重)则移除,未选则按点击顺序追加。