提交 0c0cf0f1 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 fbd7ec53
......@@ -26,7 +26,13 @@ const imageList = $computed<string[]>(() => {
})
const fileList = $computed<{ name: string; url: string }[]>(() => {
try {
return JSON.parse(props.data.file)
const files = JSON.parse(props.data.file)
return files.map((item: string | { name: string; url: string }) => {
if (typeof item === 'string') {
return { name: item, url: item }
}
return item
})
} catch (error) {
return []
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论