feat(fs):通过实现自定义协议支持图片的读取。

This commit is contained in:
徐涛
2023-03-20 22:23:22 +08:00
parent 733dd48663
commit 48fbe067a0
6 changed files with 59 additions and 8 deletions

View File

@@ -24,7 +24,8 @@ export const useFileListStore = createStoreHook<FileListState & FileListActions>
updateFiles(files) {
set(df => {
df.files = addIndex<Omit<FileItem, 'sort'>, FileItem>(map)(
(item, index) => mergeLeft({ sort: index * 10, path: convertFileSrc(item.path) }, item),
(item, index) =>
mergeLeft({ sort: index * 10, path: convertFileSrc(item.path, 'comic') }, item),
files
);
df.actives = [];