Skip to content

Commit dd47e60

Browse files
committed
feat: 增加stackoverflow的对应id
1 parent 09375ed commit dd47e60

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pages/posts/_id/index.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
</client-only>
4545
</div>
4646
<div class="markdown-preview" v-html="compiledMarkdown"></div>
47+
<div v-if="this.post.stackoverflow" class="border-top pt-2"><p class="stackoverflow">原文链接 https://stackoverflow.com/questions/{{this.post.stackoverflow.id}}</p></div>
4748
</div>
4849
<div class="d-flex justify-content-center mb-5 mt-3">
4950
<div class="card text-dark bg-light mb-3" style="width: 100px">
@@ -204,13 +205,14 @@ export default {
204205
editor: {},
205206
comments: [],
206207
updated_at: null,
208+
stackoverflow: null,
207209
},
208210
favor: false,
209211
posts: [],
210212
commentContent: null,
211213
owner: false,
212214
isSubmitting: false,
213-
auth: { id: 0 }
215+
auth: { id: 0 },
214216
};
215217
},
216218
mounted() {
@@ -433,4 +435,9 @@ export default {
433435
.comment-box {
434436
overflow: hidden;
435437
}
438+
439+
.stackoverflow {
440+
color: #999999;
441+
font-size: 0.7em;
442+
}
436443
</style>

0 commit comments

Comments
 (0)