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

Commit

Permalink
fix(question): 精品问题在精选标签页下隐藏小图标
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Oct 15, 2018
1 parent a8b9200 commit 585840d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
3 changes: 2 additions & 1 deletion src/page/question/QuestionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
<question-card
v-for="question in questions"
:key="question.id"
:question="question" />
:question="question"
:no-excellent="type === 'excellent'" />
<div v-if="questions.length && !loadmore" class="main-loadmore">
<button class="main-loadmore_button" @click="fetchQuestionsMore">加载更多</button>
</div>
Expand Down
39 changes: 20 additions & 19 deletions src/page/question/components/QuestionCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
tag="h3"
class="title">
{{ question.subject }}
<span v-show="question.excellent" class="shang-i">精</span>
<span v-show="question.excellent && !noExcellent" class="shang-i">精</span>
</router-link>

<!-- The question first image. -->
Expand Down Expand Up @@ -50,7 +50,8 @@ export default {
QuestionListAnswerCard
},
props: {
question: { type: Object, required: true }
question: { type: Object, required: true },
noExcellent: { type: Boolean, default: false }
},
computed: {
/**
Expand Down Expand Up @@ -134,25 +135,25 @@ export default {
.dot {
margin: 0 10px 0 0;
}
}
.shang {
// margin-left: 10px;
color: #fca308;
.shang {
// margin-left: 10px;
color: #fca308;
&-i,
span {
color: #fca308;
width: 20px;
height: 21px;
font-size: 22px;
font-weight: normal;
font-stretch: normal;
line-height: 0px;
letter-spacing: 0px;
border: solid 1px #fca308;
padding: 0 4px;
border-radius: 6px;
}
&-i,
span {
color: #fca308;
width: 20px;
height: 21px;
font-size: 22px;
font-weight: normal;
font-stretch: normal;
line-height: 0px;
letter-spacing: 0px;
border: solid 1px #fca308;
padding: 0 4px;
border-radius: 6px;
}
}
}
Expand Down

0 comments on commit 585840d

Please sign in to comment.