Commit 8b17249 1 parent ec03c67 commit 8b17249 Copy full SHA for 8b17249
File tree 2 files changed +31
-1
lines changed
2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" fixed right-5 top-24 w-28 h-40 bg-pink-500" >
3
+ <div >
4
+ <NuxtLink href =" /courses" > 更多课程 </NuxtLink >
5
+ </div >
6
+ <div >{{ coursesStore.currentCourse.title }}</div >
7
+ <div >
8
+ <button @click =" handleDoAgain" >重新开始</button >
9
+ </div >
10
+ </div >
11
+ </template >
12
+
13
+ <script setup lang="ts">
14
+ import { useCoursesStore } from " ~/store/courses" ;
15
+ import { useMode } from " ./game" ;
16
+
17
+ const coursesStore = useCoursesStore ();
18
+ const { showQuestion } = useMode ();
19
+
20
+ function handleDoAgain() {
21
+ coursesStore .doAgain ();
22
+ showQuestion ()
23
+ }
24
+ </script >
25
+
26
+ <style scoped></style >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <Game ></Game >
2
+ <div class =" relative" >
3
+ <Game ></Game >
4
+ <Tool ></Tool >
5
+ </div >
3
6
</template >
4
7
5
8
<script setup lang="ts">
6
9
import Game from " ~/components/main/Game.vue" ;
10
+ import Tool from ' ~/components/main/Tool.vue' ;
7
11
import { useCoursesStore } from " ~/store/courses" ;
8
12
9
13
const route = useRoute ();
You can’t perform that action at this time.
0 commit comments