diff --git a/src/pages/myElection/index.vue b/src/pages/myElection/index.vue index e26c136..97b83ff 100644 --- a/src/pages/myElection/index.vue +++ b/src/pages/myElection/index.vue @@ -201,7 +201,7 @@ const choiceText = (choice) => { .election-item { margin-bottom: 30rpx; - padding: 40rpx; + padding: 34rpx; border-radius: 24rpx; background: linear-gradient(0deg, rgba(0, 0, 0, 0.001), rgba(0, 0, 0, 0.001)), #ffffff; box-sizing: border-box; diff --git a/src/pages/votingElection/index.vue b/src/pages/votingElection/index.vue index 7818c1d..126385a 100644 --- a/src/pages/votingElection/index.vue +++ b/src/pages/votingElection/index.vue @@ -64,11 +64,21 @@ const buttlist = ref([ } ]) -const selectBut = (data: any, cardid: any, type: string) => { +const selectBut = (data: any, cardid: any, type: string, butname: string) => { const target = data.find((card: { id: any }) => card.id === cardid) - if (target) { - target.yijian = target.yijian === type ? null : type - } + uni.showModal({ + title: '您本轮选举投' + butname + '票', + content: '确定吗?', + success: function (res) { + if (res.confirm) { + if (target) { + target.yijian = target.yijian === type ? null : type + } + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) } @@ -100,7 +110,7 @@ const selectBut = (data: any, cardid: any, type: string) => { class="minbut" v-for="(item, ele) in buttlist" :key="ele" - @click="selectBut(data, row.id, item.type)" + @click="selectBut(data, row.id, item.type, item.butname)" :class="{ active: row.yijian === item.type }" > {{ item.butname }} diff --git a/src/uni.scss b/src/uni.scss index aabfee7..0268b9f 100644 --- a/src/uni.scss +++ b/src/uni.scss @@ -1,5 +1,4 @@ -// @import 'uview-plus/theme.scss'; -// @use 'uview-plus/theme.scss'; +@import 'uview-plus/theme.scss'; #app { box-sizing: border-box; diff --git a/uni.css b/uni.css deleted file mode 100644 index 257c1a5..0000000 --- a/uni.css +++ /dev/null @@ -1,181 +0,0 @@ -@charset "UTF-8"; -#app { - box-sizing: border-box; - background-color: #f5f5f5; -} - -/* 颜色变量 */ -/*============================= 文字尺寸 =============================*/ -image { - width: 100%; - height: 100%; - box-sizing: border-box; -} - -view { - box-sizing: border-box; -} - -/*============================= 弹性盒子 =============================*/ -.flex-end-evenly, .flex-end-around, .flex-end-between, .flex-end-end, .flex-end-center, .flex-end-start, .flex-center-evenly, .flex-center-around, .flex-center-between, .flex-center-end, .flex-center-start, .flex-start-evenly, .flex-start-around, .flex-start-between, .flex-start-end, .flex-start-center, .flex-start-start, .flex { - display: flex; - flex-wrap: nowrap; -} - -.flex { - align-items: center; - justify-content: center; -} -.flex-start-start { - align-items: flex-start; - justify-content: flex-start; -} -.flex-start-center { - align-items: flex-start; - justify-content: center; -} -.flex-start-end { - align-items: flex-start; - justify-content: flex-end; -} -.flex-start-between { - align-items: flex-start; - justify-content: space-between; -} -.flex-start-around { - align-items: flex-start; - justify-content: space-around; -} -.flex-start-evenly { - align-items: flex-start; - justify-content: space-evenly; -} -.flex-center-start { - align-items: center; - justify-content: flex-start; -} -.flex-center-end { - align-items: center; - justify-content: flex-end; -} -.flex-center-between { - align-items: center; - justify-content: space-between; -} -.flex-center-around { - align-items: center; - justify-content: space-around; -} -.flex-center-evenly { - align-items: center; - justify-content: space-evenly; -} -.flex-end-start { - align-items: flex-end; - justify-content: flex-start; -} -.flex-end-center { - align-items: flex-end; - justify-content: center; -} -.flex-end-end { - align-items: flex-end; - justify-content: flex-end; -} -.flex-end-between { - align-items: flex-end; - justify-content: space-between; -} -.flex-end-around { - align-items: flex-end; - justify-content: space-around; -} -.flex-end-evenly { - align-items: flex-end; - justify-content: space-evenly; -} - -[class*=flex-].nowrap, -[class^=flex].nowrap { - flex-wrap: nowrap; -} -[class*=flex-].stretch, -[class^=flex].stretch { - align-items: stretch; -} -[class*=flex-].row, -[class^=flex].row { - flex-direction: row; -} -[class*=flex-].row-reverse, -[class^=flex].row-reverse { - flex-direction: "row-reverse"; -} -[class*=flex-].column, -[class^=flex].column { - flex-direction: column; -} -[class*=flex-].column-reverse, -[class^=flex].column-reverse { - flex-direction: "column-reverse"; -} -[class*=flex-].wrap, -[class^=flex].wrap { - flex-wrap: wrap; -} -[class*=flex-].wrap-reverse, -[class^=flex].wrap-reverse { - flex-wrap: "wrap-reverse"; -} - -.flex1 { - flex: 1; -} - -.flex2 { - flex: 2; -} - -.flex3 { - flex: 3; -} - -.flex4 { - flex: 4; -} - -/*============================= 文字溢出 =============================*/ -.text-ellipsis { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} -.text-ellipsis-2 { - overflow: hidden; - white-space: normal; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - line-clamp: 1; - -webkit-line-clamp: 2; -} -.text-ellipsis-3 { - overflow: hidden; - white-space: normal; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - line-clamp: 1; - -webkit-line-clamp: 3; -} -.text-ellipsis-4 { - overflow: hidden; - white-space: normal; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-box-orient: vertical; - line-clamp: 1; - -webkit-line-clamp: 4; -} - -/*# sourceMappingURL=uni.css.map */