From 743caa3d4c2955d030099eb464e9a36e80d40dde Mon Sep 17 00:00:00 2001 From: Hx <2294602187@qq.com> Date: Wed, 26 Mar 2025 17:50:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E4=B8=BE=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/electionList/index.vue | 236 ++++++++++++++++++++++++- src/app/pages/votingElection/index.vue | 81 +-------- src/styles/flex.scss | 62 +++++++ src/styles/index.scss | 2 +- 4 files changed, 292 insertions(+), 89 deletions(-) create mode 100644 src/styles/flex.scss diff --git a/src/app/pages/electionList/index.vue b/src/app/pages/electionList/index.vue index a5c4930..529a28b 100644 --- a/src/app/pages/electionList/index.vue +++ b/src/app/pages/electionList/index.vue @@ -1,13 +1,231 @@ -//选举列表 + + - + \ No newline at end of file + &-bts { + padding: 16rpx; + margin: 48rpx 0 24rpx; + font-size: 28rpx; + font-weight: normal; + line-height: 42rpx; + text-align: center; + color: #ffffff; + background-color: #2563eb; + border-radius: 8rpx; + } + } + } +} + diff --git a/src/app/pages/votingElection/index.vue b/src/app/pages/votingElection/index.vue index e833133..b363ff5 100644 --- a/src/app/pages/votingElection/index.vue +++ b/src/app/pages/votingElection/index.vue @@ -59,8 +59,6 @@ const doSearch = (_formData: { page: number; limit: number }, onSuccess: Functio \ No newline at end of file diff --git a/src/styles/flex.scss b/src/styles/flex.scss new file mode 100644 index 0000000..c22ad29 --- /dev/null +++ b/src/styles/flex.scss @@ -0,0 +1,62 @@ +%flex-base { + display: flex; + flex-wrap: nowrap; +} + +$flex-way: ( + start, + flex-start), + (center, center), + (end, flex-end), + (between, space-between), + (around, space-around), + (evenly, space-evenly +); + +@mixin flex-algin($align) { + @each $way, $justify in $flex-way { + &-#{$way} { + @if $way !=$align { + @if $way !=$align { + @extend %flex-base; + align-items: $align; + justify-content: $justify; + } + } + } + } +} + +.flex { + @extend %flex-base; + align-items: center; + justify-content: center; + + @each $way, $justify in (start, flex-start), (center, center), (end, flex-end) { + &-#{$way} { + @include flex-algin($justify); + } + } +} + +[class^="flex"] { + &.stretch { + align-items: stretch; + } + + @each $direction, $name in (row, direction), (column, direction), (wrap, wrap) { + &.#{$direction} { + flex-#{$name}: $direction; + + &-reverse { + flex-#{$name}: '#{$direction}-reverse'; + } + } + } +} + +@for $i from 1 through 4 { + .flex#{$i} { + flex: $i; + } +} \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index 302dd2a..2698e0e 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -2,4 +2,4 @@ @import 'common.scss'; @import 'iconfont.css'; @import 'official-iconfont.css'; - +@import 'flex.scss'; \ No newline at end of file