mirror of
https://github.com/LiuYuYang01/ThriveX-Blog.git
synced 2026-05-07 06:07:34 +08:00
更新 Record 接口,将 images 字段的数据类型调整为 string | string[],并在页面组件中优化数据解析方式,确保兼容性和提升代码可读性。
This commit is contained in:
@@ -60,7 +60,7 @@ export default async (props: Props) => {
|
||||
<div className="w-full p-4 border dark:border-black-b rounded-3xl rounded-tl-none bg-[rgba(255,255,255,0.7)] dark:bg-[rgba(30,36,46,0.9)] backdrop-blur-sm ">
|
||||
<Editor value={item?.content} />
|
||||
|
||||
<ImageList list={item?.images || []} />
|
||||
<ImageList list={JSON.parse(item?.images as string || '[]')} />
|
||||
{/* <Comment /> */}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
2
src/types/app/record.d.ts
vendored
2
src/types/app/record.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
export interface Record {
|
||||
id?: number,
|
||||
content: string,
|
||||
images: string[],
|
||||
images: string | string[],
|
||||
createTime?: string | Dayjs;
|
||||
}
|
||||
Reference in New Issue
Block a user