提交 af6d3b84 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 f51836a0
...@@ -41,6 +41,8 @@ export default { ...@@ -41,6 +41,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.vote { .vote {
padding: 0.2rem; padding: 0.2rem;
height: auto;
min-height: 100vh;
} }
.box { .box {
margin-bottom: 0.1rem; margin-bottom: 0.1rem;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="vote-project" v-for="(item, index) in list" :key="index"> <div class="vote-project" v-for="(item, index) in list" :key="index">
<h2 class="vote-project-title">{{ item.project }}:</h2> <h2 class="vote-project-title">{{ item.project }}:</h2>
<p class="vote-project-text"> <p class="vote-project-text">
<template v-for="(user, index) in item.candidate"> <template v-for="(user, index) in item.checked">
<span v-if="user.checked" :key="user.id"><template v-if="index"></template>{{ user.name }}</span> <span v-if="user.checked" :key="user.id"><template v-if="index"></template>{{ user.name }}</span>
</template> </template>
</p> </p>
...@@ -38,7 +38,10 @@ export default { ...@@ -38,7 +38,10 @@ export default {
return this.$route.query.city return this.$route.query.city
}, },
list() { list() {
return this.$store.state.voteList return this.$store.state.voteList.map(item => {
item.checked = item.candidate.filter(item => item.checked)
return item
})
} }
}, },
methods: { methods: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论