md2ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +230 -0
- package/bin/md2ui.js +168 -0
- package/index.html +14 -0
- package/package.json +46 -0
- package/public/README.md +106 -0
- package/public/docs/00-/345/277/253/351/200/237/345/274/200/345/247/213.md +51 -0
- package/public/docs/01-/345/212/237/350/203/275/347/211/271/346/200/247.md +57 -0
- package/public/docs/02-Mermaid/345/233/276/350/241/250.md +102 -0
- package/public/docs/03-/350/277/233/351/230/266/346/214/207/345/215/227/01-/347/233/256/345/275/225/347/273/223/346/236/204.md +55 -0
- package/public/docs/03-/350/277/233/351/230/266/346/214/207/345/215/227/02-/350/207/252/345/256/232/344/271/211/351/205/215/347/275/256.md +63 -0
- package/public/docs/03-/350/277/233/351/230/266/346/214/207/345/215/227/03-/351/203/250/347/275/262/346/226/271/346/241/210.md +73 -0
- package/public/docs/04-API/345/217/202/350/200/203/01-/347/273/204/344/273/266API.md +80 -0
- package/public/docs/04-API/345/217/202/350/200/203/02-Composables.md +92 -0
- package/public/logo.svg +6 -0
- package/src/App.vue +171 -0
- package/src/api/docs.js +103 -0
- package/src/components/ImageZoom.vue +285 -0
- package/src/components/Logo.vue +44 -0
- package/src/components/TableOfContents.vue +44 -0
- package/src/components/TreeNode.vue +61 -0
- package/src/composables/useMarkdown.js +128 -0
- package/src/composables/useResize.js +50 -0
- package/src/composables/useScroll.js +77 -0
- package/src/main.js +5 -0
- package/src/style.css +784 -0
- package/vite.config.js +9 -0
package/src/style.css
ADDED
|
@@ -0,0 +1,784 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
|
|
9
|
+
line-height: 1.75;
|
|
10
|
+
color: #1a202c;
|
|
11
|
+
background: #f7fafc;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
#app {
|
|
18
|
+
height: 100vh;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.container {
|
|
22
|
+
display: flex;
|
|
23
|
+
height: 100vh;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* 侧边栏样式 */
|
|
27
|
+
.sidebar {
|
|
28
|
+
min-width: 200px;
|
|
29
|
+
max-width: 400px;
|
|
30
|
+
background: #ffffff;
|
|
31
|
+
border-right: 1px solid #e2e8f0;
|
|
32
|
+
overflow-y: auto;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.logo {
|
|
38
|
+
padding: 24px 24px;
|
|
39
|
+
border-bottom: 1px solid #e2e8f0;
|
|
40
|
+
background: #fafbfd;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.nav-menu {
|
|
46
|
+
padding: 8px 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.nav-section {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
padding: 20px 24px 8px;
|
|
54
|
+
font-size: 11px;
|
|
55
|
+
color: #718096;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
text-transform: uppercase;
|
|
58
|
+
letter-spacing: 0.05em;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.nav-actions {
|
|
62
|
+
display: flex;
|
|
63
|
+
gap: 4px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.action-btn {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
width: 20px;
|
|
71
|
+
height: 20px;
|
|
72
|
+
border: none;
|
|
73
|
+
background: transparent;
|
|
74
|
+
color: #a0aec0;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
border-radius: 3px;
|
|
77
|
+
transition: all 0.15s;
|
|
78
|
+
padding: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.action-btn:hover {
|
|
82
|
+
background: #edf2f7;
|
|
83
|
+
color: #2d3748;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.nav-item {
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
padding: 9px 24px;
|
|
90
|
+
margin: 1px 0;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
transition: all 0.15s;
|
|
93
|
+
color: #4a5568;
|
|
94
|
+
font-size: 13px;
|
|
95
|
+
border-left: 2px solid transparent;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.nav-item:hover {
|
|
99
|
+
background: #f7fafc;
|
|
100
|
+
color: #1a202c;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.nav-item.active {
|
|
104
|
+
background: #ebf4ff;
|
|
105
|
+
color: #2b6cb0;
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
border-left-color: #3182ce;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* 图标样式 */
|
|
111
|
+
.nav-icon {
|
|
112
|
+
flex-shrink: 0;
|
|
113
|
+
margin-right: 10px;
|
|
114
|
+
color: #a0aec0;
|
|
115
|
+
transition: all 0.15s;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.nav-item:hover .nav-icon {
|
|
119
|
+
color: #2d3748;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.nav-item.active .nav-icon {
|
|
123
|
+
color: #3182ce;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.chevron-icon {
|
|
127
|
+
margin-right: 4px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.folder-icon {
|
|
131
|
+
color: #ed8936;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.file-icon {
|
|
135
|
+
color: #a0aec0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.home-icon {
|
|
139
|
+
color: #4299e1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* 文件夹样式 */
|
|
143
|
+
.nav-folder {
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
color: #2d3748;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.nav-folder:hover {
|
|
149
|
+
background: #f7fafc;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.nav-folder:hover .folder-icon {
|
|
153
|
+
color: #dd6b20;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* 多级目录样式 */
|
|
157
|
+
.nav-item.level-0 {
|
|
158
|
+
font-weight: 500;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.nav-item.level-1 {
|
|
162
|
+
font-size: 14px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.nav-item.level-2 {
|
|
166
|
+
font-size: 13px;
|
|
167
|
+
opacity: 0.9;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* 内容区域样式 */
|
|
171
|
+
.content {
|
|
172
|
+
flex: 1;
|
|
173
|
+
overflow-y: auto;
|
|
174
|
+
padding: 0;
|
|
175
|
+
background: #ffffff;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.markdown-content {
|
|
179
|
+
max-width: 880px;
|
|
180
|
+
margin: 0 auto;
|
|
181
|
+
background: #ffffff;
|
|
182
|
+
padding: 64px 80px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Markdown 内容样式 */
|
|
186
|
+
.markdown-content h1 {
|
|
187
|
+
font-size: 32px;
|
|
188
|
+
margin-bottom: 32px;
|
|
189
|
+
padding-bottom: 16px;
|
|
190
|
+
border-bottom: 2px solid #e2e8f0;
|
|
191
|
+
color: #1a202c;
|
|
192
|
+
font-weight: 700;
|
|
193
|
+
letter-spacing: -0.02em;
|
|
194
|
+
line-height: 1.25;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.markdown-content h2 {
|
|
198
|
+
font-size: 24px;
|
|
199
|
+
margin-top: 56px;
|
|
200
|
+
margin-bottom: 20px;
|
|
201
|
+
color: #2d3748;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
letter-spacing: -0.01em;
|
|
204
|
+
line-height: 1.35;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.markdown-content h3 {
|
|
208
|
+
font-size: 18px;
|
|
209
|
+
margin-top: 40px;
|
|
210
|
+
margin-bottom: 16px;
|
|
211
|
+
color: #2d3748;
|
|
212
|
+
font-weight: 600;
|
|
213
|
+
line-height: 1.5;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.markdown-content h4 {
|
|
217
|
+
font-size: 16px;
|
|
218
|
+
margin-top: 32px;
|
|
219
|
+
margin-bottom: 12px;
|
|
220
|
+
color: #4a5568;
|
|
221
|
+
font-weight: 600;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.markdown-content p {
|
|
225
|
+
margin-bottom: 20px;
|
|
226
|
+
color: #2d3748;
|
|
227
|
+
font-size: 15px;
|
|
228
|
+
line-height: 1.75;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.markdown-content ul,
|
|
232
|
+
.markdown-content ol {
|
|
233
|
+
margin-bottom: 20px;
|
|
234
|
+
padding-left: 24px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.markdown-content li {
|
|
238
|
+
margin-bottom: 8px;
|
|
239
|
+
color: #2d3748;
|
|
240
|
+
font-size: 15px;
|
|
241
|
+
line-height: 1.75;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.markdown-content code {
|
|
245
|
+
background: #fef2f2;
|
|
246
|
+
padding: 3px 8px;
|
|
247
|
+
border-radius: 4px;
|
|
248
|
+
font-family: "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
|
|
249
|
+
font-size: 13px;
|
|
250
|
+
color: #dc2626;
|
|
251
|
+
border: 1px solid #fecaca;
|
|
252
|
+
font-weight: 500;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.markdown-content pre {
|
|
256
|
+
background: #1e1e1e;
|
|
257
|
+
padding: 20px 24px;
|
|
258
|
+
border-radius: 6px;
|
|
259
|
+
overflow-x: auto;
|
|
260
|
+
margin-bottom: 24px;
|
|
261
|
+
border: 1px solid #2d2d2d;
|
|
262
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.markdown-content pre code {
|
|
266
|
+
background: none;
|
|
267
|
+
color: #d4d4d4;
|
|
268
|
+
padding: 0;
|
|
269
|
+
border: none;
|
|
270
|
+
font-size: 13px;
|
|
271
|
+
line-height: 1.7;
|
|
272
|
+
display: block;
|
|
273
|
+
font-weight: 400;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.markdown-content a {
|
|
277
|
+
color: #3182ce;
|
|
278
|
+
text-decoration: underline;
|
|
279
|
+
text-decoration-color: #90cdf4;
|
|
280
|
+
text-underline-offset: 2px;
|
|
281
|
+
transition: all 0.15s;
|
|
282
|
+
font-weight: 500;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.markdown-content a:hover {
|
|
286
|
+
color: #2c5282;
|
|
287
|
+
text-decoration-color: #3182ce;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* 表格容器 - 支持横向滚动 */
|
|
291
|
+
.markdown-content .table-wrapper {
|
|
292
|
+
width: 100%;
|
|
293
|
+
overflow-x: auto;
|
|
294
|
+
margin-bottom: 32px;
|
|
295
|
+
border-radius: 8px;
|
|
296
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.markdown-content table {
|
|
300
|
+
width: 100%;
|
|
301
|
+
border-collapse: collapse;
|
|
302
|
+
margin-bottom: 0;
|
|
303
|
+
border: 1px solid #cbd5e0;
|
|
304
|
+
font-size: 14px;
|
|
305
|
+
border-radius: 8px;
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
table-layout: auto;
|
|
308
|
+
background: #ffffff;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.markdown-content table th,
|
|
312
|
+
.markdown-content table td {
|
|
313
|
+
border: 1px solid #e2e8f0;
|
|
314
|
+
padding: 14px 18px;
|
|
315
|
+
text-align: left;
|
|
316
|
+
vertical-align: top;
|
|
317
|
+
word-wrap: break-word;
|
|
318
|
+
word-break: break-word;
|
|
319
|
+
min-width: 100px;
|
|
320
|
+
line-height: 1.6;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.markdown-content table th {
|
|
324
|
+
background: linear-gradient(to bottom, #f7fafc 0%, #edf2f7 100%);
|
|
325
|
+
font-weight: 600;
|
|
326
|
+
color: #2d3748;
|
|
327
|
+
font-size: 13px;
|
|
328
|
+
letter-spacing: 0.02em;
|
|
329
|
+
white-space: nowrap;
|
|
330
|
+
border-bottom: 2px solid #cbd5e0;
|
|
331
|
+
position: sticky;
|
|
332
|
+
top: 0;
|
|
333
|
+
z-index: 10;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* 第一列(表A)适中宽度 */
|
|
337
|
+
.markdown-content table th:first-child,
|
|
338
|
+
.markdown-content table td:first-child {
|
|
339
|
+
width: 15%;
|
|
340
|
+
min-width: 140px;
|
|
341
|
+
font-weight: 500;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/* 第二列(关系类型)窄一些 */
|
|
345
|
+
.markdown-content table th:nth-child(2),
|
|
346
|
+
.markdown-content table td:nth-child(2) {
|
|
347
|
+
width: 8%;
|
|
348
|
+
min-width: 70px;
|
|
349
|
+
text-align: center;
|
|
350
|
+
font-weight: 500;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/* 第三列(表B)适中宽度 */
|
|
354
|
+
.markdown-content table th:nth-child(3),
|
|
355
|
+
.markdown-content table td:nth-child(3) {
|
|
356
|
+
width: 15%;
|
|
357
|
+
min-width: 140px;
|
|
358
|
+
font-weight: 500;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* 第四列(关联字段)较宽 */
|
|
362
|
+
.markdown-content table th:nth-child(4),
|
|
363
|
+
.markdown-content table td:nth-child(4) {
|
|
364
|
+
width: 22%;
|
|
365
|
+
min-width: 180px;
|
|
366
|
+
font-family: "SF Mono", "Consolas", "Monaco", monospace;
|
|
367
|
+
font-size: 13px;
|
|
368
|
+
color: #4a5568;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/* 最后一列(说明)最宽,自动填充剩余空间 */
|
|
372
|
+
.markdown-content table th:last-child,
|
|
373
|
+
.markdown-content table td:last-child {
|
|
374
|
+
width: 40%;
|
|
375
|
+
min-width: 220px;
|
|
376
|
+
color: #4a5568;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.markdown-content table tbody tr {
|
|
380
|
+
transition: all 0.15s ease;
|
|
381
|
+
border-bottom: 1px solid #f1f5f9;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.markdown-content table tbody tr:hover {
|
|
385
|
+
background-color: #f8fafc;
|
|
386
|
+
box-shadow: inset 0 0 0 1px #e2e8f0;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.markdown-content table tbody tr:last-child {
|
|
390
|
+
border-bottom: none;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/* 字段名样式 */
|
|
394
|
+
.markdown-content table .field-name-cell {
|
|
395
|
+
font-family: "SF Mono", "Consolas", "Monaco", monospace;
|
|
396
|
+
color: #dc2626;
|
|
397
|
+
font-weight: 500;
|
|
398
|
+
font-size: 13px;
|
|
399
|
+
background-color: #fef2f2;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* 必填标记样式 */
|
|
403
|
+
.markdown-content table .required-yes {
|
|
404
|
+
color: #2d3748;
|
|
405
|
+
font-weight: 600;
|
|
406
|
+
text-align: center;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/* 表格滚动条样式 */
|
|
410
|
+
.markdown-content .table-wrapper::-webkit-scrollbar {
|
|
411
|
+
height: 8px;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.markdown-content .table-wrapper::-webkit-scrollbar-track {
|
|
415
|
+
background: #f1f5f9;
|
|
416
|
+
border-radius: 4px;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.markdown-content .table-wrapper::-webkit-scrollbar-thumb {
|
|
420
|
+
background: #cbd5e0;
|
|
421
|
+
border-radius: 4px;
|
|
422
|
+
transition: background 0.2s;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.markdown-content .table-wrapper::-webkit-scrollbar-thumb:hover {
|
|
426
|
+
background: #94a3b8;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.markdown-content blockquote {
|
|
430
|
+
border-left: 3px solid #4299e1;
|
|
431
|
+
padding-left: 20px;
|
|
432
|
+
margin: 24px 0;
|
|
433
|
+
color: #4a5568;
|
|
434
|
+
font-style: italic;
|
|
435
|
+
background: #ebf8ff;
|
|
436
|
+
padding: 16px 20px;
|
|
437
|
+
border-radius: 4px;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.markdown-content img {
|
|
441
|
+
max-width: 100%;
|
|
442
|
+
height: auto;
|
|
443
|
+
border-radius: 4px;
|
|
444
|
+
margin: 16px 0;
|
|
445
|
+
transition: all 0.2s ease;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.markdown-content img:hover {
|
|
449
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
450
|
+
transform: translateY(-2px);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* 可放大图片样式 */
|
|
454
|
+
.zoomable-image {
|
|
455
|
+
cursor: zoom-in !important;
|
|
456
|
+
position: relative;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.zoomable-image::after {
|
|
460
|
+
content: '🔍';
|
|
461
|
+
position: absolute;
|
|
462
|
+
top: 8px;
|
|
463
|
+
right: 8px;
|
|
464
|
+
background: rgba(0, 0, 0, 0.7);
|
|
465
|
+
color: white;
|
|
466
|
+
padding: 4px 8px;
|
|
467
|
+
border-radius: 4px;
|
|
468
|
+
font-size: 12px;
|
|
469
|
+
opacity: 0;
|
|
470
|
+
transition: opacity 0.2s ease;
|
|
471
|
+
pointer-events: none;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.zoomable-image:hover::after {
|
|
475
|
+
opacity: 1;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/* Mermaid 图表样式 */
|
|
479
|
+
.markdown-content .mermaid {
|
|
480
|
+
margin: 24px 0;
|
|
481
|
+
text-align: center;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.markdown-content .mermaid svg {
|
|
485
|
+
max-width: 100%;
|
|
486
|
+
height: auto;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.markdown-content .mermaid-error {
|
|
490
|
+
color: #f56c6c;
|
|
491
|
+
background: #fef0f0;
|
|
492
|
+
padding: 12px;
|
|
493
|
+
border-radius: 4px;
|
|
494
|
+
border: 1px solid #fde2e2;
|
|
495
|
+
font-size: 14px;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/* 滚动条样式 */
|
|
499
|
+
.sidebar::-webkit-scrollbar,
|
|
500
|
+
.content::-webkit-scrollbar {
|
|
501
|
+
width: 6px;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.sidebar::-webkit-scrollbar-thumb,
|
|
505
|
+
.content::-webkit-scrollbar-thumb {
|
|
506
|
+
background: #dcdfe6;
|
|
507
|
+
border-radius: 3px;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.sidebar::-webkit-scrollbar-thumb:hover,
|
|
511
|
+
.content::-webkit-scrollbar-thumb:hover {
|
|
512
|
+
background: #c0c4cc;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/* 返回顶部按钮 */
|
|
516
|
+
.back-to-top {
|
|
517
|
+
position: fixed;
|
|
518
|
+
right: 32px;
|
|
519
|
+
bottom: 32px;
|
|
520
|
+
width: 56px;
|
|
521
|
+
height: 56px;
|
|
522
|
+
display: flex;
|
|
523
|
+
flex-direction: column;
|
|
524
|
+
align-items: center;
|
|
525
|
+
justify-content: center;
|
|
526
|
+
gap: 4px;
|
|
527
|
+
background: #ffffff;
|
|
528
|
+
color: #3182ce;
|
|
529
|
+
border: 1px solid #cbd5e0;
|
|
530
|
+
border-radius: 8px;
|
|
531
|
+
cursor: pointer;
|
|
532
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
533
|
+
transition: all 0.2s;
|
|
534
|
+
z-index: 1000;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.back-to-top:hover {
|
|
538
|
+
background: #3182ce;
|
|
539
|
+
color: #ffffff;
|
|
540
|
+
border-color: #3182ce;
|
|
541
|
+
box-shadow: 0 6px 16px rgba(49, 130, 206, 0.3);
|
|
542
|
+
transform: translateY(-2px);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.back-to-top:active {
|
|
546
|
+
transform: translateY(0) scale(0.95);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.progress-text {
|
|
550
|
+
font-size: 14px;
|
|
551
|
+
font-weight: 600;
|
|
552
|
+
line-height: 1;
|
|
553
|
+
color: inherit;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/* 淡入淡出动画 */
|
|
557
|
+
.fade-enter-active,
|
|
558
|
+
.fade-leave-active {
|
|
559
|
+
transition: opacity 0.3s, transform 0.3s;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.fade-enter-from,
|
|
563
|
+
.fade-leave-to {
|
|
564
|
+
opacity: 0;
|
|
565
|
+
transform: translateY(10px);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/* 右侧目录样式 */
|
|
569
|
+
.toc-sidebar {
|
|
570
|
+
min-width: 200px;
|
|
571
|
+
max-width: 400px;
|
|
572
|
+
background: #ffffff;
|
|
573
|
+
border-left: 1px solid #e2e8f0;
|
|
574
|
+
overflow-y: auto;
|
|
575
|
+
flex-shrink: 0;
|
|
576
|
+
padding: 64px 0 32px;
|
|
577
|
+
box-shadow: -2px 0 8px rgba(0, 0, 0, 0.02);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.toc-header {
|
|
581
|
+
display: flex;
|
|
582
|
+
align-items: center;
|
|
583
|
+
gap: 8px;
|
|
584
|
+
padding: 0 24px 16px;
|
|
585
|
+
font-size: 11px;
|
|
586
|
+
font-weight: 600;
|
|
587
|
+
color: #718096;
|
|
588
|
+
border-bottom: 1px solid #e2e8f0;
|
|
589
|
+
letter-spacing: 0.05em;
|
|
590
|
+
text-transform: uppercase;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.toc-nav {
|
|
594
|
+
padding: 16px 0;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.toc-item {
|
|
598
|
+
display: block;
|
|
599
|
+
padding: 6px 24px;
|
|
600
|
+
color: #718096;
|
|
601
|
+
text-decoration: none;
|
|
602
|
+
font-size: 12px;
|
|
603
|
+
line-height: 1.6;
|
|
604
|
+
transition: all 0.15s;
|
|
605
|
+
border-left: 2px solid transparent;
|
|
606
|
+
overflow: hidden;
|
|
607
|
+
text-overflow: ellipsis;
|
|
608
|
+
white-space: nowrap;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.toc-item:hover {
|
|
612
|
+
color: #2d3748;
|
|
613
|
+
background: #f7fafc;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.toc-item.active {
|
|
617
|
+
color: #3182ce;
|
|
618
|
+
border-left-color: #3182ce;
|
|
619
|
+
font-weight: 500;
|
|
620
|
+
background: #ebf8ff;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/* 不同层级的缩进 */
|
|
624
|
+
.toc-item.toc-level-1 {
|
|
625
|
+
padding-left: 24px;
|
|
626
|
+
font-size: 13px;
|
|
627
|
+
font-weight: 500;
|
|
628
|
+
color: #4a5568;
|
|
629
|
+
margin-top: 12px;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.toc-item.toc-level-2 {
|
|
633
|
+
padding-left: 32px;
|
|
634
|
+
font-size: 12px;
|
|
635
|
+
margin-top: 2px;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.toc-item.toc-level-3 {
|
|
639
|
+
padding-left: 40px;
|
|
640
|
+
font-size: 11px;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.toc-item.toc-level-4 {
|
|
644
|
+
padding-left: 56px;
|
|
645
|
+
font-size: 12px;
|
|
646
|
+
opacity: 0.9;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.toc-item.toc-level-5 {
|
|
650
|
+
padding-left: 68px;
|
|
651
|
+
font-size: 11px;
|
|
652
|
+
opacity: 0.85;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.toc-item.toc-level-6 {
|
|
656
|
+
padding-left: 80px;
|
|
657
|
+
font-size: 11px;
|
|
658
|
+
opacity: 0.8;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/* 目录滚动条样式 */
|
|
662
|
+
.toc-sidebar::-webkit-scrollbar {
|
|
663
|
+
width: 6px;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.toc-sidebar::-webkit-scrollbar-thumb {
|
|
667
|
+
background: #dcdfe6;
|
|
668
|
+
border-radius: 3px;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.toc-sidebar::-webkit-scrollbar-thumb:hover {
|
|
672
|
+
background: #c0c4cc;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
/* 拖拽条样式 */
|
|
676
|
+
.resizer {
|
|
677
|
+
width: 4px;
|
|
678
|
+
background: transparent;
|
|
679
|
+
cursor: col-resize;
|
|
680
|
+
flex-shrink: 0;
|
|
681
|
+
position: relative;
|
|
682
|
+
transition: background 0.15s;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.resizer::before {
|
|
686
|
+
content: '';
|
|
687
|
+
position: absolute;
|
|
688
|
+
top: 0;
|
|
689
|
+
bottom: 0;
|
|
690
|
+
left: -2px;
|
|
691
|
+
right: -2px;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.resizer:hover {
|
|
695
|
+
background: #e5e7eb;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.resizer:active {
|
|
699
|
+
background: #111827;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.resizer-left {
|
|
703
|
+
margin-left: -1px;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.resizer-right {
|
|
707
|
+
margin-right: -1px;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/* 收起/展开按钮 */
|
|
711
|
+
.collapse-btn,
|
|
712
|
+
.expand-btn {
|
|
713
|
+
position: fixed;
|
|
714
|
+
top: 70px;
|
|
715
|
+
z-index: 100;
|
|
716
|
+
width: 32px;
|
|
717
|
+
height: 32px;
|
|
718
|
+
display: flex;
|
|
719
|
+
align-items: center;
|
|
720
|
+
justify-content: center;
|
|
721
|
+
background: #ffffff;
|
|
722
|
+
border: 1px solid #cbd5e0;
|
|
723
|
+
border-radius: 6px;
|
|
724
|
+
cursor: pointer;
|
|
725
|
+
color: #718096;
|
|
726
|
+
transition: all 0.2s;
|
|
727
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.collapse-btn:hover,
|
|
731
|
+
.expand-btn:hover {
|
|
732
|
+
color: #3182ce;
|
|
733
|
+
border-color: #3182ce;
|
|
734
|
+
box-shadow: 0 4px 12px rgba(49, 130, 206, 0.15);
|
|
735
|
+
transform: translateY(-1px);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
.collapse-btn-left {
|
|
739
|
+
left: 16px;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.collapse-btn-right {
|
|
743
|
+
right: 16px;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.expand-btn-left {
|
|
747
|
+
left: 16px;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.expand-btn-right {
|
|
751
|
+
right: 16px;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/* 响应式设计 */
|
|
755
|
+
@media (max-width: 1200px) {
|
|
756
|
+
.toc-sidebar {
|
|
757
|
+
display: none;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.resizer-right {
|
|
761
|
+
display: none;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
@media (max-width: 768px) {
|
|
766
|
+
.sidebar {
|
|
767
|
+
width: 240px;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.content {
|
|
771
|
+
padding: 20px;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.markdown-content {
|
|
775
|
+
padding: 20px;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.back-to-top {
|
|
779
|
+
right: 20px;
|
|
780
|
+
bottom: 20px;
|
|
781
|
+
width: 48px;
|
|
782
|
+
height: 48px;
|
|
783
|
+
}
|
|
784
|
+
}
|