Skip to content

Commit 3f95198

Browse files
committed
feat: quick jump
1 parent cfdc03f commit 3f95198

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/components/users/comment/CommentCardContent.vue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<v-card tile elevation="0">
33
<slot name="title" :localComment="comment">
4-
<v-card-title class="pa-sm-4 pa-2 pb-sm-0 py-sm-0">
4+
<v-card-title class="pa-sm-4 pa-2 pb-sm-0 py-sm-0 hoverlink" @click="$router.push({ path: `/course/${comment.course.id}`, query: { answer: comment.id } })">
55
<v-container>
66
<v-row>
77
<v-col cols="12" class="pa-0 d-flex">
@@ -13,6 +13,11 @@
1313
<div class="justify-start text-h6 overflow">
1414
{{ comment.is_covered ? comment.cover_title : comment.title }}
1515
</div>
16+
<div style="transform: translate(0, -1px)">
17+
<v-icon size="24">
18+
{{ statics.icons.mdiChevronRight }}
19+
</v-icon>
20+
</div>
1621
</v-col>
1722
</v-row>
1823
</v-container>
@@ -162,6 +167,14 @@
162167
:semester="semester"
163168
>
164169
<div class="d-flex justify-end" style="flex-wrap: wrap">
170+
<div class="pr-sm-2 router-container" @click="$router.push({ path: `/course/${comment.course.id}`, query: { answer: comment.id } })">
171+
<v-icon size="15" style="transform: translate(0, -1px)">
172+
{{ statics.icons.mdiCommentOutline }}
173+
</v-icon>
174+
<span class="text-caption">
175+
评论
176+
</span>
177+
</div>
165178
<div class="pr-sm-2">
166179
<v-icon size="15" style="transform: translate(0, -1px)">
167180
{{ statics.icons.mdiTriangle }}
@@ -265,4 +278,9 @@ export default {
265278
.router-container:hover {
266279
cursor: pointer;
267280
}
281+
282+
.hoverlink:hover {
283+
cursor: pointer;
284+
text-decoration: underline;
285+
}
268286
</style>

src/composables/users/comment/useCommentCardContent.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
mdiTriangleSmallUp,
99
mdiShare,
1010
mdiGold,
11+
mdiCommentOutline,
12+
mdiChevronRight,
1113
} from '@mdi/js';
1214
import { gradingInfo } from '@/composables/global/useStaticData';
1315
import { inject } from 'vue';
@@ -24,6 +26,8 @@ export default () => {
2426
mdiTriangleSmallUp,
2527
mdiShare,
2628
mdiGold,
29+
mdiCommentOutline,
30+
mdiChevronRight,
2731
},
2832
grade: [
2933
gradingInfo.quality,

0 commit comments

Comments
 (0)