Skip to content

Commit 790b39b

Browse files
committed
添加懒加载支持并新增卡片数据的外部 JSON 文件管理
1 parent b826ece commit 790b39b

File tree

3 files changed

+549
-0
lines changed

3 files changed

+549
-0
lines changed

src/components/RepoDocCards.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ function Shield(props: ShieldConfig) {
125125
component: NImage,
126126
props: {
127127
previewDisabled: props.previewDisabled ?? true,
128+
lazy: true,
128129
...props,
129130
}
130131
};

src/data/repo-doc-cards.json

Lines changed: 373 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,373 @@
1+
{
2+
"metadata": {
3+
"version": "1.0.0",
4+
"description": "Simple Robot 组件库展示数据",
5+
"lastUpdated": "2025-07-22"
6+
},
7+
"predefinedTags": {
8+
"official": {
9+
"name": "Official",
10+
"type": "info"
11+
},
12+
"core": {
13+
"name": "核心",
14+
"type": "info"
15+
},
16+
"component": {
17+
"name": "组件",
18+
"type": "success"
19+
},
20+
"wip": {
21+
"name": "<b>🚧WIP</b>",
22+
"type": "warning"
23+
},
24+
"helpWanted": {
25+
"name": "<b>🤝期待协助</b>",
26+
"type": "success"
27+
},
28+
"dead": {
29+
"name": "<b>💀阵亡</b>",
30+
"type": "error"
31+
},
32+
"dying": {
33+
"name": "⚠濒死",
34+
"type": "warning"
35+
}
36+
},
37+
"cards": [
38+
{
39+
"id": "core-lib",
40+
"name": "核心库",
41+
"tags": ["official", "core"],
42+
"shields": [
43+
{
44+
"src": "https://img.shields.io/github/v/release/simple-robot/simpler-robot?label=version",
45+
"alt": "核心库",
46+
"previewDisabled": true
47+
}
48+
],
49+
"description": "核心库是组件库的基础,也是绝大多数基本API存在的地方。",
50+
"links": [
51+
[
52+
{
53+
"name": "前往仓库",
54+
"href": "https://github.com/simple-robot/simpler-robot",
55+
"type": "info"
56+
}
57+
],
58+
[
59+
{
60+
"name": "API文档",
61+
"href": "main-v4/",
62+
"type": "primary"
63+
},
64+
{
65+
"name": "API文档(快照)",
66+
"href": "snapshots/main-v4/",
67+
"type": "primary"
68+
}
69+
],
70+
[
71+
{
72+
"name": "🍀官网",
73+
"href": "https://simbot.forte.love/",
74+
"type": "default"
75+
}
76+
]
77+
]
78+
},
79+
{
80+
"id": "qq-guild-component",
81+
"name": "QQ机器人组件",
82+
"tags": ["official", "component"],
83+
"shields": [
84+
{
85+
"src": "https://img.shields.io/github/v/release/simple-robot/simbot-component-qq-guild?label=version",
86+
"alt": "QQ机器人组件",
87+
"previewDisabled": true
88+
}
89+
],
90+
"description": "QQ机器人组件基于核心库对 <a href='https://bot.q.qq.com/wiki'>QQ机器人官方API</a> 进行实现,提供强大的QQ机器人平台功能。",
91+
"links": [
92+
[
93+
{
94+
"name": "前往仓库",
95+
"href": "https://github.com/simple-robot/simbot-component-qq-guild",
96+
"type": "info"
97+
}
98+
],
99+
[
100+
{
101+
"name": "API文档",
102+
"href": "components/qq-guild/",
103+
"type": "primary"
104+
},
105+
{
106+
"name": "API文档(快照)",
107+
"href": "snapshots/components/qq-guild/",
108+
"type": "primary"
109+
}
110+
],
111+
[
112+
{
113+
"name": "前往手册",
114+
"href": "https://simbot.forte.love/component-qq-guild.html",
115+
"type": "default"
116+
}
117+
]
118+
]
119+
},
120+
{
121+
"id": "onebot-component",
122+
"name": "OneBot组件",
123+
"tags": ["official", "component"],
124+
"shields": [
125+
{
126+
"src": "https://img.shields.io/github/v/release/simple-robot/simbot-component-onebot?label=version",
127+
"alt": "OneBot组件",
128+
"previewDisabled": true
129+
}
130+
],
131+
"description": "OneBot组件基于核心库对 <a href='https://github.com/botuniverse/onebot-11'>OneBot11协议</a> 进行实现,提供强大的OneBot客户端功能。",
132+
"links": [
133+
[
134+
{
135+
"name": "前往仓库",
136+
"href": "https://github.com/simple-robot/simbot-component-onebot",
137+
"type": "info"
138+
}
139+
],
140+
[
141+
{
142+
"name": "API文档",
143+
"href": "components/onebot/",
144+
"type": "primary"
145+
},
146+
{
147+
"name": "API文档(快照)",
148+
"href": "snapshots/components/onebot/",
149+
"type": "primary"
150+
}
151+
],
152+
[
153+
{
154+
"name": "前往手册",
155+
"href": "https://simbot.forte.love/component-onebot.html",
156+
"type": "default"
157+
}
158+
]
159+
]
160+
},
161+
{
162+
"id": "kook-component",
163+
"name": "KOOK组件",
164+
"tags": ["official", "component"],
165+
"shields": [
166+
{
167+
"src": "https://img.shields.io/github/v/release/simple-robot/simbot-component-kook?label=version",
168+
"alt": "KOOK组件",
169+
"previewDisabled": true
170+
}
171+
],
172+
"description": "KOOK组件基于核心库对 <a href='https://developer.kookapp.cn/doc/reference'>KOOK机器人</a> 进行实现,提供强大的KOOK机器人平台功能。",
173+
"links": [
174+
[
175+
{
176+
"name": "前往仓库",
177+
"href": "https://github.com/simple-robot/simbot-component-kook",
178+
"type": "info"
179+
}
180+
],
181+
[
182+
{
183+
"name": "API文档",
184+
"href": "components/kook/",
185+
"type": "primary"
186+
},
187+
{
188+
"name": "API文档(快照)",
189+
"href": "snapshots/components/kook/",
190+
"type": "primary"
191+
}
192+
],
193+
[
194+
{
195+
"name": "前往手册",
196+
"href": "https://simbot.forte.love/component-kook.html",
197+
"type": "default"
198+
}
199+
]
200+
]
201+
},
202+
{
203+
"id": "telegram-component",
204+
"name": "Telegram组件",
205+
"tags": ["wip", "helpWanted", "official", "component"],
206+
"shields": [
207+
{
208+
"src": "https://img.shields.io/github/v/release/simple-robot/simbot-component-telegram?label=version",
209+
"alt": "Telegram组件",
210+
"previewDisabled": true
211+
}
212+
],
213+
"description": "Telegram组件基于核心库对 <a href='https://core.telegram.org/bots/api'>Telegram Bot</a> 进行实现,提供强大的Telegram机器人平台功能。",
214+
"links": [
215+
[
216+
{
217+
"name": "前往仓库",
218+
"href": "https://github.com/simple-robot/simbot-component-telegram",
219+
"type": "info"
220+
}
221+
],
222+
[
223+
{
224+
"name": "API文档",
225+
"href": "components/telegram/",
226+
"type": "primary"
227+
},
228+
{
229+
"name": "API文档(快照)",
230+
"href": "snapshots/components/telegram/",
231+
"type": "primary"
232+
}
233+
],
234+
[
235+
{
236+
"name": "前往手册",
237+
"href": "https://simbot.forte.love/component-telegram.html",
238+
"type": "default"
239+
}
240+
]
241+
]
242+
},
243+
{
244+
"id": "discord-component",
245+
"name": "Discord组件",
246+
"tags": ["wip", "helpWanted", "official", "component"],
247+
"shields": [
248+
{
249+
"src": "https://img.shields.io/github/v/release/simple-robot/simbot-component-discord?label=version",
250+
"alt": "Discord组件",
251+
"previewDisabled": true
252+
}
253+
],
254+
"description": "Discord组件基于核心库对 <a href='https://discord.com/developers/docs/intro'>Discord Bot</a> 进行实现,提供强大的Discord机器人平台功能。",
255+
"links": [
256+
[
257+
{
258+
"name": "前往仓库",
259+
"href": "https://github.com/simple-robot/simbot-component-discord",
260+
"type": "info"
261+
}
262+
],
263+
[
264+
{
265+
"name": "API文档",
266+
"href": "components/discord/",
267+
"type": "primary"
268+
},
269+
{
270+
"name": "API文档(快照)",
271+
"href": "snapshots/components/discord/",
272+
"type": "primary"
273+
}
274+
],
275+
[
276+
{
277+
"name": "前往手册",
278+
"href": "https://simbot.forte.love/component-discord.html",
279+
"type": "default"
280+
}
281+
]
282+
]
283+
}
284+
],
285+
"deprecatedCards": [
286+
{
287+
"id": "mirai-component",
288+
"name": "mirai组件",
289+
"tags": ["dying", "official", "component"],
290+
"shields": [
291+
{
292+
"src": "https://img.shields.io/github/v/release/simple-robot/simbot-component-mirai?label=version",
293+
"alt": "mirai组件",
294+
"previewDisabled": true
295+
}
296+
],
297+
"description": "Mirai组件基于核心库对 <a href='https://github.com/mamoe/mirai'>mirai框架</a> 进行实现,提供强大的QQ机器人平台功能。",
298+
"links": [
299+
[
300+
{
301+
"name": "前往仓库",
302+
"href": "https://github.com/simple-robot/simbot-component-mirai",
303+
"type": "info"
304+
}
305+
],
306+
[
307+
{
308+
"name": "API文档",
309+
"href": "components/mirai/",
310+
"type": "primary"
311+
},
312+
{
313+
"name": "API文档(快照)",
314+
"href": "snapshots/components/mirai/",
315+
"type": "primary"
316+
}
317+
],
318+
[
319+
{
320+
"name": "前往手册",
321+
"href": "https://simple-robot.github.io/simbot-component-mirai",
322+
"type": "default"
323+
}
324+
]
325+
],
326+
"deprecated": true,
327+
"deprecatedReason": "濒死状态,不再积极维护"
328+
},
329+
{
330+
"id": "miyoushe-villa-component",
331+
"name": "米游社大别野组件",
332+
"tags": ["dead", "official", "component"],
333+
"shields": [
334+
{
335+
"src": "https://img.shields.io/github/v/release/simple-robot/simbot-component-miyoushe-villa?label=version",
336+
"alt": "米游社大别野组件",
337+
"previewDisabled": true
338+
}
339+
],
340+
"description": "米游社大别野组件基于核心库对 <a href='https://open.miyoushe.com/'>米游社大别野机器人</a> 进行实现,提供强大的米游社大别野机器人平台功能。",
341+
"links": [
342+
[
343+
{
344+
"name": "前往仓库",
345+
"href": "https://github.com/simple-robot/simbot-component-miyoushe-villa",
346+
"type": "info"
347+
}
348+
],
349+
[
350+
{
351+
"name": "API文档",
352+
"href": "components/miyoushe-villa/",
353+
"type": "primary"
354+
},
355+
{
356+
"name": "API文档(快照)",
357+
"href": "snapshots/components/miyoushe-villa/",
358+
"type": "primary"
359+
}
360+
],
361+
[
362+
{
363+
"name": "前往手册",
364+
"href": "https://simple-robot.github.io/simbot-component-miyoushe-villa/",
365+
"type": "default"
366+
}
367+
]
368+
],
369+
"deprecated": true,
370+
"deprecatedReason": "大别野服务已停用"
371+
}
372+
]
373+
}

0 commit comments

Comments
 (0)