Skip to content

Commit

Permalink
[adjust] 成员投票情况页 总人数、已投、未投 的按钮改成文字按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
VecHK committed Jan 4, 2024
1 parent 1237399 commit 3c03f05
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions dashboard/src/views/gallery/photo/member.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<ElHeader height="32px">
<ElButton size="small" type="primary" icon="el-icon-refresh" @click="refresh">刷新</ElButton>

<ElButton size="small" icon="el-icon-tickets">总人数: {{ totalPeopleCount }}</ElButton>
<ElButton size="small" type="text" icon="el-icon-tickets">总人数: {{ totalPeopleCount }}</ElButton>

<ElButton size="small" icon="el-icon-check">已投 {{ votedPeopleCount }}</ElButton>
<ElButton size="small" type="text" icon="el-icon-check">已投 {{ votedPeopleCount }}</ElButton>

<ElButton size="small" icon="el-icon-close">未投 {{ totalPeopleCount - votedPeopleCount }}</ElButton>
<ElButton size="small" type="text" icon="el-icon-close">未投 {{ totalPeopleCount - votedPeopleCount }}</ElButton>
</ElHeader>

<ElMain>
Expand All @@ -31,7 +31,7 @@
{text: '未投', value: false }
]"
:filter-multiple="false"
:filter-method="filterHandler"
:filter-method="voteStatusFilter"
filter-placement="bottom-end"
sortable
>
Expand All @@ -44,7 +44,7 @@
<template v-if="getPhotoById(vote.photo_id)">
<ImageBox
:key="vote.id"
:src="getPhotoById(vote.photo_id).thumb"
:src="getPhotoById(vote.photo_id)['thumb_url']"
style="margin: 0 4px; width: 64px; height: 64px;"
@click="$router.push({
name: 'GalleryPhotoDetail',
Expand Down Expand Up @@ -114,8 +114,9 @@
},
methods: {
filterHandler(filterValue, row, column) {
return filterValue === Boolean(row.votes && row.votes.length)
voteStatusFilter(filter_value, row, column) {
const member_is_voted = Boolean(row.votes && row.votes.length)
return filter_value === member_is_voted
},
getPhotoById(photo_id) {
Expand Down

0 comments on commit 3c03f05

Please sign in to comment.