1313 </v-row >
1414 <v-chip v-if =" course?.grade" class =" mr-1" density =" compact" color =" green" >
1515 <v-icon icon =" mdi-star" class =" mr-1" />
16- 学分:{{ course?.grade }}
16+ 学分:{{ course?.credit }}
1717 </v-chip >
18- <v-chip v-if =" course?.class" class =" mr-1" density =" compact" color =" primary" >
18+ <v-chip v-if =" course?.class" class =" mr-1" density =" compact" color =" primary" >
1919 <v-icon icon =" mdi-label-outline" class =" mr-1" />
2020 {{ course?.class }}
2121 </v-chip >
2727 }}
2828 </v-chip >
2929
30- <MDC v-if =" course" class =" mt-4" :value =" course?.doc_str" tag =" article" />
30+ <div class =" article" >
31+ <MDC v-if =" course" class =" mt-4" :value =" course?.doc_str" tag =" article" />
32+ </div >
3133
32- <v-divider class =" mt-6" />
34+ <v-divider class =" mt-6" />
3335
3436 <v-sheet style =" border-left : red solid 4px ;" class =" mt-6 pl-4" variant =" text" >
3537 <span >
3638 <p class =" text-disabled" >
3739 <v-icon class =" mr-1" >mdi-pencil</v-icon >
3840 发现错误?想一起完善?
39- <a style =" color : blue " class =" text-decoration-none cursor-pointer" @click =" navigateTo(`/edit/${majorId}/${docId}`)" >编辑此页</a >
41+ <a style =" color : blue " class =" text-decoration-none cursor-pointer"
42+ @click =" navigateTo(`/edit/${majorId}/${docId}`)" >编辑此页</a >
4043 </p >
41-
44+
4245 <p class =" text-disabled" >
4346 <v-icon class =" mr-1" >mdi-code-braces</v-icon >
4447 网站功能不够完善,我想贡献!
45- <a href =" https://github.com/Acfboy/ProPassGuide" class =" text-decoration-none" >在 Github 上贡献代码</a >
48+ <a href =" https://github.com/Acfboy/ProPassGuide" class =" text-decoration-none" >在 Github
49+ 上贡献代码</a >
4650 </p >
4751 </span >
4852 </v-sheet >
5155
5256 </v-row >
5357 <v-navigation-drawer floating location =" right" class =" position-fixed" >
58+ <template #prepend >
59+ <p class =" text-h6 mt-4" >目录</p >
60+ </template >
5461 <div v-if =" toc.length" class =" toc-container mt-4" >
55- <div class =" toc-title" >目录</div >
5662 <ul class =" toc-list" >
5763 <li v-for =" item in toc" :key =" item.id" :class =" { 'active-toc': activeTocId === item.id }"
5864 :style =" { paddingLeft: (item.level - 1) * 16 + 'px' }" >
@@ -88,6 +94,16 @@ const { data: course } = await useAsyncData(`major-${majorId}-${docId}`, () =>
8894 })
8995);
9096
97+ if (course .value ?.link ) {
98+ course .value = await
99+ requestFetch <CourseWithDbId >(" /api/courses/doc" , {
100+ method: " GET" ,
101+ query: {
102+ major: course .value .link .major_id ,
103+ course: course .value .link .course_id ,
104+ }
105+ })
106+ }
91107
92108interface TocItem {
93109 level: number ;
@@ -183,6 +199,7 @@ h4 a,
183199h5 a ,
184200h6 a {
185201 color : black ;
202+ font-weight : 500 ;
186203 text-decoration : none ;
187204}
188205
@@ -239,4 +256,16 @@ h6 {
239256 border-left : #1565c0 solid 2px ;
240257 font-size : 0.98rem ;
241258}
259+
260+ .article p {
261+ line-height : 1.8 ;
262+ }
263+
264+
265+ .article li {
266+ line-height : 1.8 ;
267+ margin-left : 1em ;
268+ margin-top : 0.5em ;
269+ margin-bottom : 0.5em ;
270+ }
242271 </style >
0 commit comments