diff --git a/src/assets/image.png b/src/assets/image.png new file mode 100644 index 0000000..4e5c886 Binary files /dev/null and b/src/assets/image.png differ diff --git a/src/views/rating/RatingPage.vue b/src/views/rating/RatingPage.vue index ea80dee..bac346c 100644 --- a/src/views/rating/RatingPage.vue +++ b/src/views/rating/RatingPage.vue @@ -6,13 +6,71 @@

你成功的复述了所提的问题吗?

- - + + + +
+ +
+

对你这次回答表现的评分是:

+ + + + + + 再抽一次 + +
+ + +
+ 生气表情 +

为 什 么 不 好 好 听 课

+ + + + 再抽一次 +
- + diff --git a/src/views/roll/RollCallPage.vue b/src/views/roll/RollCallPage.vue index fc79147..d1f6695 100644 --- a/src/views/roll/RollCallPage.vue +++ b/src/views/roll/RollCallPage.vue @@ -10,8 +10,13 @@ @rollCompleted="handleRollCompleted(index)" /> - @@ -33,8 +38,15 @@ const durations = ref( const completedRolls = ref(new Array(stopNumbers.value.length).fill(false)) const confirmed = ref(false) +const isButtonPressed = ref(false) const toggleScrolling = () => { + isButtonPressed.value = true + if (isScrolling.value == false) { + setTimeout(() => { + isButtonPressed.value = false + }, 10) + } isScrolling.value = !isScrolling.value // 切换 isScrolling 的值 if (isScrolling.value) { completedRolls.value = new Array(stopNumbers.value.length).fill(false) // 重置 completedRolls 数组 @@ -49,6 +61,7 @@ const handleRollCompleted = (index) => { !confirmed.value ) { setTimeout(() => { + isButtonPressed.value = false // 确认弹窗出现后,重置按钮按下状态 if ( !confirmed.value && confirm(`抽到了: ${stopNumbers.value.join('')},确定后跳转`) @@ -73,7 +86,7 @@ onUnmounted(() => { align-items: center; justify-content: center; height: 100vh; - gap: 20px; /* 设置按钮与RollingNumber部分之间的间距 */ + gap: 20px; } .rolling-numbers { @@ -98,14 +111,24 @@ onUnmounted(() => { transform 0.1s; } -.button:hover { +.button-pressed { + background-color: #0056b3; + box-shadow: inset 2px 2px 8px rgba(0, 0, 0, 0.3); + transform: translateY(2px); +} + +.button:hover:not(:disabled) { background-color: #1e90ff; box-shadow: inset -4px -4px 10px rgba(0, 0, 0, 0.2); } -.button:active { +.button:active:not(:disabled) { background-color: #0056b3; box-shadow: inset 2px 2px 8px rgba(0, 0, 0, 0.3); transform: translateY(2px); } + +.button:disabled { + cursor: not-allowed; +}