Skip to content

Commit

Permalink
优化评分
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyun8023 committed Aug 6, 2024
1 parent c68c6e8 commit d424938
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions app/calibre-pages/src/components/MetadataEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,15 @@
</el-form-item>
<el-form-item label="评分">
<el-col :span="18">
<el-rate v-model="form.rating" :max="10"
show-score text-color="#ff9900"
score-template="{value} points"/>
<el-rate
:value="form.rating/2"
@input="(val)=>form.rating=val*2"
show-score
text-color="#ff9900"
:max="5"
allow-half
:score-template="`${form.rating/2}`">
</el-rate>
</el-col>
<el-col :span="6">
<el-radio-group class="align-right" v-model="ratingNew" aria-label="label position" placeholder=""
Expand Down
12 changes: 9 additions & 3 deletions app/calibre-pages/src/views/Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,15 @@
Rating
</div>
</template>
<el-rate v-model="book.rating" :max="10" disabled
show-score text-color="#ff9900"
score-template="{value} points"/>
<el-rate
:value="book.rating/2"
@input="(val)=>book.rating=val*2"
show-score
text-color="#ff9900"
:max="5"
allow-half
:score-template="`${book.rating/2}`">
</el-rate>
</el-descriptions-item>
<el-descriptions-item v-if="book.tags && book.tags.length">
<template #label>
Expand Down

0 comments on commit d424938

Please sign in to comment.