feat: 重构部分代码,略微完成文章md渲染部分

This commit is contained in:
539943419 committed 2025-01-12 23:31:37 +08:00
1 parent 6be2c9a0d7
commit c2be826bc5
12 files changed
+200 -11

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import type { postItem } from "~/types/post";
function generateFakeData(length: number) {
const data: postItem[] = [];
for (let i = 0; i < length; i++) {
data.push({
id: i,
title: `测试标题`,
summary: `测试摘要测试摘要测试摘要测试摘要测试摘要测试摘要测试摘要测试摘要测试摘要测试摘要测试摘要`,
type: 'markdown',
tags: ['test', 'test1'],
url: '',
date: parseInt(new Date().getTime().toFixed()),
});
}
return data;
}
export default defineEventHandler((event) => {
const data = generateFakeData(50)
return data
})