Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix(question): (close #260) 修复点击列表下的回答未进入回答详情
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Jul 27, 2018
1 parent 3092cee commit e0d205d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/page/question/QuestionListAnswerCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<div v-if="answer" class="module-question-list-answer-card">
<div
v-if="answer"
class="module-question-list-answer-card"
@click="gotoAnswerDetail">
<!-- User avatar. -->
<user-avatar
:anonymity="anonymity"
Expand Down Expand Up @@ -67,6 +70,12 @@ export default {
const { body } = this.answer;
return syntaxTextAndImage(body || "").text;
}
},
methods: {
gotoAnswerDetail() {
const { question_id: qid, id } = this.answer;
this.$router.push(`/questions/${qid}/answers/${id}`);
}
}
};
</script>
Expand Down

0 comments on commit e0d205d

Please sign in to comment.