-
{{ opt }}
-
+
+
+
+
-
{{ pollVotes[idx] || 0 }} 票
-
-
- 投票
+ v-for="(opt, idx) in poll.options"
+ :key="idx"
+ class="poll-option"
+ @click="voteOption(idx)"
+ >
+
+ {{ opt }}
+
+
-
@@ -358,6 +359,7 @@ const isAdmin = computed(() => authState.role === 'ADMIN')
const isAuthor = computed(() => authState.username === author.value.username)
const lottery = ref(null)
const poll = ref(null)
+const showPollResult = ref(false)
const countdown = ref('00:00:00')
let countdownTimer = null
const lotteryParticipants = computed(() => lottery.value?.participants || [])
@@ -1239,6 +1241,88 @@ onMounted(async () => {
cursor: pointer;
}
+.poll-option-button {
+ color: var(--text-color);
+ padding: 5px 10px;
+ border-radius: 8px;
+ background-color: rgb(218, 218, 218);
+ cursor: pointer;
+ width: fit-content;
+}
+
+.poll-top-container {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ border-bottom: 1px solid var(--normal-border-color);
+}
+
+.poll-options-container {
+ display: flex;
+ flex-direction: column;
+ overflow-y: auto;
+ flex: 4;
+}
+
+.poll-info {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ min-height: 100px;
+ border-left: 1px solid var(--normal-border-color);
+}
+
+.total-votes {
+ font-size: 40px;
+ font-weight: bold;
+ opacity: 0.8;
+}
+
+.total-votes-title {
+ font-size: 18px;
+ opacity: 0.5;
+}
+
+.poll-option {
+ margin-bottom: 10px;
+ margin-right: 10px;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+}
+
+.poll-option-input {
+ margin-right: 10px;
+ width: 18px;
+ height: 18px;
+ accent-color: var(--primary-color);
+ border-radius: 50%;
+ border: 2px solid var(--primary-color);
+}
+
+.poll-option-text {
+ font-size: 16px;
+}
+
+.poll-bottom-container {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.poll-left-time {
+ display: flex;
+ flex-direction: row;
+}
+
+.poll-left-time-title {
+ font-size: 13px;
+ opacity: 0.7;
+}
+
.action-menu-icon {
cursor: pointer;
font-size: 18px;
@@ -1379,10 +1463,6 @@ onMounted(async () => {
margin-bottom: 10px;
}
-.poll-option {
- margin-bottom: 10px;
-}
-
.poll-option-progress {
position: relative;
background-color: var(--border-color);
@@ -1477,12 +1557,14 @@ onMounted(async () => {
margin-left: 10px;
}
+.poll-left-time-title,
.prize-end-time-title {
font-size: 13px;
opacity: 0.7;
margin-right: 5px;
}
+.poll-left-time-value,
.prize-end-time-value {
font-size: 13px;
font-weight: bold;