Skip to content

Commit c317ba4

Browse files
committed
feat: add submit answer button on mobile
1 parent c3c704e commit c317ba4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

apps/client/components/main/QuestionInput/QuestionInput.vue

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
</div>
2222
</template>
2323
<input
24+
lang="en"
2425
ref="inputEl"
2526
class="absolute h-full w-full opacity-0"
2627
type="text"
@@ -35,6 +36,14 @@
3536
autoFocus
3637
/>
3738
</div>
39+
<div class="mt-12 flex items-center justify-center md:hidden">
40+
<button
41+
class="btn btn-outline btn-sm"
42+
@click="handleSubmitAnswer"
43+
>
44+
提交
45+
</button>
46+
</div>
3847
</div>
3948
</template>
4049

@@ -117,6 +126,10 @@ function focusInputWhenWIndowFocus() {
117126
});
118127
}
119128
129+
function handleSubmitAnswer() {
130+
submitAnswer(handleAnswerRight, handleAnswerError);
131+
}
132+
120133
function getWordsClassNames(index: number) {
121134
const word = findWordById(index)!;
122135
// 当前单词激活 且 聚焦

0 commit comments

Comments
 (0)