1
+ <template >
2
+ <div >
3
+ <n-grid x-gap =" 12" y-gap =" 14" cols =" 1 s:2 m:3 l:4 xl:5 2xl:6" responsive =" screen" >
4
+ <n-gi v-for =" card in componentCards" >
5
+ <n-card :title =" card.name" hoverable :content-style =" {'min-height': '160px'}" >
6
+
7
+ <n-image-group >
8
+ <n-space size =" small" >
9
+ <component v-for =" {component, props} in card.shields" :is =" component" v-bind =" props" />
10
+ </n-space >
11
+ </n-image-group >
12
+
13
+ <n-space size =" small" >
14
+ <component v-for =" { component, props } in card.tags"
15
+ v-bind =" props"
16
+ :is =" component"
17
+ v-text =" props.name" />
18
+ </n-space >
19
+
20
+
21
+ <n-p v-html =" card.description" ></n-p >
22
+
23
+ <template #action >
24
+ <n-grid cols =" 1" style =" text-align : center ; min-height : 120px " >
25
+ <n-gi v-for =" componentLinks in card.links" >
26
+ <n-a v-for =" componentLink in componentLinks" :href =" componentLink.href" target =" _blank" >
27
+ <n-button quaternary :type =" componentLink.type" >
28
+ {{ componentLink.name }}
29
+ </n-button >
30
+ </n-a >
31
+ </n-gi >
32
+ </n-grid >
33
+ </template >
34
+
35
+ </n-card >
36
+ </n-gi >
37
+ </n-grid >
38
+ </div >
39
+ </template >
40
+
41
+
1
42
<script setup>
2
43
import {NA , NButton , NCard , NGi , NGrid , NImage , NImageGroup , NP , NSpace , NTag } from " naive-ui" ;
3
44
4
- const officialTag = {name: " Official" , type: " info" }
5
- const coreTag = {name: " 核心" , type: " info" }
6
- const componentTag = {name: " 组件" , type: " success" }
45
+ function Tag (props ) {
46
+ return {
47
+ component: NTag,
48
+ props: {
49
+ round: props .round || true ,
50
+ size: props .size || ' small' ,
51
+ ... props
52
+ }
53
+ }
54
+ }
55
+
56
+ function Shield (props ) {
57
+ return {
58
+ component: NImage,
59
+ props: {
60
+ previewDisabled: props .previewDisabled || true ,
61
+ ... props,
62
+ }
63
+ }
64
+ }
65
+
66
+ const officialTag = Tag ({ name: ' Official' , type: ' info' })
67
+ const coreTag = Tag ({ name: ' 核心' , type: ' info' })
68
+ const componentTag = Tag ({name: " 组件" , type: " success" })
69
+ const WIPTag = Tag ({ name: ' WIP🚧' , type: ' warning' })
70
+ const helpWanted = Tag ({ name: ' 期待协助🤝' , type: ' success' })
71
+ const deadTag = Tag ({ name: ' 阵亡💀' , type: ' error' })
7
72
8
73
const componentCards = [
9
74
{
10
75
name: " 核心库" ,
11
76
tags: [officialTag, coreTag],
12
77
shields: [
13
- { src: " https://img.shields.io/github/v/release/simple-robot/simpler-robot?label=version" , alt: " 核心库" } ,
78
+ Shield ({ src: " https://img.shields.io/github/v/release/simple-robot/simpler-robot?label=version" , alt: " 核心库" }) ,
14
79
],
15
80
description: " 核心库是组件库的基础,也是绝大多数基本API存在的地方。" ,
16
81
links: [
@@ -30,11 +95,12 @@ const componentCards = [
30
95
name: " KOOK组件" ,
31
96
tags: [officialTag, componentTag],
32
97
shields: [
33
- {
98
+ Shield ( {
34
99
src: " https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-kook-core?&label=version" ,
35
100
alt: " KOOK组件"
36
- },
101
+ }) ,
37
102
],
103
+
38
104
description: " KOOK组件基于核心库对 <a href='https://developer.kookapp.cn/doc/reference'>KOOK机器人</a> 进行实现,提供强大的KOOK机器人平台功能。" ,
39
105
links: [
40
106
[{name: " 前往仓库" , href: " https://github.com/simple-robot/simbot-component-kook" , type: " info" }],
@@ -45,15 +111,14 @@ const componentCards = [
45
111
[{name: " 前往手册" , href: " https://component-kook.simbot.forte.love/" , type: " default" }],
46
112
]
47
113
},
48
-
49
114
{
50
115
name: " QQ频道组件" ,
51
116
tags: [officialTag, componentTag],
52
117
shields: [
53
- {
118
+ Shield ( {
54
119
src: " https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-qq-guild-core?&label=version" ,
55
120
alt: " QQ频道组件"
56
- },
121
+ }) ,
57
122
],
58
123
description: " QQ频道组件基于核心库对 <a href='https://bot.q.qq.com/wiki'>QQ频道机器人</a> 进行实现,提供强大的QQ频道机器人平台功能。" ,
59
124
links: [
@@ -69,35 +134,52 @@ const componentCards = [
69
134
[{name: " 前往手册" , href: " http://component-qqguild.simbot.forte.love/" , type: " default" }],
70
135
]
71
136
},
72
-
73
137
{
74
- name: " 米游社大别野组件 " ,
75
- tags: [officialTag, componentTag],
138
+ name: " Telegram组件 " ,
139
+ tags: [WIPTag, helpWanted, officialTag, componentTag],
76
140
shields: [
77
- {
78
- src: " https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-miyoushe-villa -core?&label=version" ,
79
- alt: " 米游社大别野组件 "
80
- },
141
+ Shield ( {
142
+ src: " https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-telegram -core?&label=version" ,
143
+ alt: " Telegram组件 "
144
+ }) ,
81
145
],
82
- description: " 米游社大别野组件基于核心库对 <a href='https://open.miyoushe.com/'>米游社大别野机器人 </a> 进行实现,提供强大的米游社大别野机器人平台功能 。" ,
146
+ description: " Telegram组件基于核心库对 <a href='https://core.telegram.org/bots/api'>Telegram Bot </a> 进行实现,提供强大的Telegram机器人平台功能 。" ,
83
147
links: [
84
- [{name: " 前往仓库" , href: " https://github.com/simple-robot/simbot-component-miyoushe-villa " , type: " info" }],
148
+ [{name: " 前往仓库" , href: " https://github.com/simple-robot/simbot-component-telegram " , type: " info" }],
85
149
[
86
- {name: " KDoc" , href: " components/miyoushe-villa " , type: " primary" },
87
- {name: " KDoc(快照)" , href: " snapshots/components/miyoushe-villa " , type: " primary" }
150
+ {name: " KDoc" , href: " components/telegram " , type: " primary" },
151
+ {name: " KDoc(快照)" , href: " snapshots/components/telegram " , type: " primary" }
88
152
],
89
- [{name: " 前往手册" , href: " https://simple-robot.github.io/simbot-component-miyoushe-villa/" , type: " default" }],
153
+ [{name: " 前往手册" , href: " https://simple-robot.github.io/simbot-component-telegram" , type: " default" }],
154
+ ]
155
+ },
156
+ {
157
+ name: " Discord组件" ,
158
+ tags: [WIPTag, helpWanted, officialTag, componentTag],
159
+ shields: [
160
+ Shield ({
161
+ src: " https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-discord-core?&label=version" ,
162
+ alt: " Discord组件"
163
+ }),
164
+ ],
165
+ description: " Discord组件基于核心库对 <a href='https://discord.com/developers/docs/intro'>Discord Bot</a> 进行实现,提供强大的Discord机器人平台功能。" ,
166
+ links: [
167
+ [{name: " 前往仓库" , href: " https://github.com/simple-robot/simbot-component-discord" , type: " info" }],
168
+ [
169
+ {name: " KDoc" , href: " components/discord" , type: " primary" },
170
+ {name: " KDoc(快照)" , href: " snapshots/components/discord" , type: " primary" }
171
+ ],
172
+ [{name: " 前往手册" , href: " https://simple-robot.github.io/simbot-component-discord" , type: " default" }],
90
173
]
91
174
},
92
-
93
175
{
94
176
name: " mirai组件" ,
95
- tags: [officialTag, componentTag],
177
+ tags: [Tag ({ name : ' 濒死⚠ ' , type : ' warning ' , round : false }), officialTag, componentTag],
96
178
shields: [
97
- {
179
+ Shield ( {
98
180
src: " https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-mirai-core?&label=version" ,
99
181
alt: " mirai组件"
100
- },
182
+ }) ,
101
183
],
102
184
description: " Mirai组件基于核心库对 <a href='https://github.com/mamoe/mirai'>mirai框架</a> 进行实现,提供强大的QQ机器人平台功能。" ,
103
185
links: [
@@ -106,51 +188,33 @@ const componentCards = [
106
188
{name: " KDoc" , href: " components/mirai" , type: " primary" },
107
189
{name: " KDoc(快照)" , href: " snapshots/components/mirai" , type: " primary" },
108
190
],
109
- [{name: " 前往手册" , href: " https://component-mirai.simbot.forte.love " , type: " default" }],
191
+ [{name: " 前往手册" , href: " https://simple-robot.github.io/simbot-component-mirai " , type: " default" }],
110
192
]
111
193
},
194
+ {
195
+ name: " 米游社大别野组件" ,
196
+ tags: [deadTag, officialTag, componentTag],
197
+ shields: [
198
+ Shield ({
199
+ src: " https://img.shields.io/maven-central/v/love.forte.simbot.component/simbot-component-miyoushe-villa-core?&label=version" ,
200
+ alt: " 米游社大别野组件"
201
+ }),
202
+ ],
203
+ description: " 米游社大别野组件基于核心库对 <a href='https://open.miyoushe.com/'>米游社大别野机器人</a> 进行实现,提供强大的米游社大别野机器人平台功能。" ,
204
+ links: [
205
+ [{name: " 前往仓库" , href: " https://github.com/simple-robot/simbot-component-miyoushe-villa" , type: " info" }],
206
+ [
207
+ {name: " KDoc" , href: " components/miyoushe-villa" , type: " primary" },
208
+ {name: " KDoc(快照)" , href: " snapshots/components/miyoushe-villa" , type: " primary" }
209
+ ],
210
+ [{name: " 前往手册" , href: " https://simple-robot.github.io/simbot-component-miyoushe-villa/" , type: " default" }],
211
+ ]
212
+ },
213
+
112
214
]
113
215
114
216
</script >
115
217
116
- <template >
117
- <div >
118
- <n-grid x-gap =" 12" y-gap =" 14" cols =" 1 s:2 m:3 l:4 xl:5 2xl:6" responsive =" screen" >
119
- <n-gi v-for =" componentCard in componentCards" >
120
- <n-card :title =" componentCard.name" hoverable :content-style =" {'min-height': '160px'}" >
121
-
122
- <n-image-group >
123
- <n-space size =" small" >
124
- <n-image v-for =" shield in componentCard.shields" :alt =" shield.alt" :src =" shield.src" preview-disabled />
125
- </n-space >
126
- </n-image-group >
127
-
128
- <n-space size =" small" >
129
- <n-tag v-for =" componentTag in componentCard.tags" :type =" componentTag.type" size =" small" round >
130
- {{ componentTag.name }}
131
- </n-tag >
132
- </n-space >
133
-
134
-
135
- <n-p v-html =" componentCard.description" ></n-p >
136
-
137
- <template #action >
138
- <n-grid cols =" 1" style =" text-align : center ; min-height : 120px " >
139
- <n-gi v-for =" componentLinks in componentCard.links" >
140
- <n-a v-for =" componentLink in componentLinks" :href =" componentLink.href" target =" _blank" >
141
- <n-button quaternary :type =" componentLink.type" >
142
- {{ componentLink.name }}
143
- </n-button >
144
- </n-a >
145
- </n-gi >
146
- </n-grid >
147
- </template >
148
-
149
- </n-card >
150
- </n-gi >
151
- </n-grid >
152
- </div >
153
- </template >
154
218
155
219
<style scoped>
156
220
0 commit comments