@@ -8,6 +8,7 @@ import BroadcastArea from '@/components/BroadcastArea.vue'
88import OpponentTable from ' @/components/OpponentTable.vue'
99import MyState from ' @/components/MyState.vue'
1010import OpenedBook from ' ./OpenedBook.vue'
11+ import SmallBook from ' ./SmallBook.vue'
1112import SpellMagicBoard from ' ./SpellMagicBoard.vue'
1213import SecretSelectTable from ' ./SecretSelectTable.vue'
1314import HintBar from ' @/components/common/HintBar.vue'
@@ -16,7 +17,8 @@ import io from 'socket.io-client'
1617import { useGameStore } from ' @/stores/game'
1718import PlayDice from ' @/components/PlayDice.vue'
1819import {
19- ref , computed , watch , onMounted
20+ ref , computed , watch , onMounted ,
21+ provide
2022} from ' vue'
2123import axios from ' axios'
2224import {
@@ -142,6 +144,8 @@ const handleJoinGame = async () => {
142144 gameRoomID,
143145 })
144146}
147+ const showOpenedBook = ref (false )
148+ provide (' showOpenedBook' , showOpenedBook)
145149watch (
146150 () => gameStore .gameStatus .current_player ,
147151 (newVal , oldVal ) => {
@@ -224,70 +228,74 @@ const handleExit = () => {
224228 class = " bg-no-repeat bg-center bg-cover p-8 relative w-full h-full"
225229 >
226230 < div class = " flex gap-11 top-8 left-8 absolute" >
227- < PlayDice v- if = " gameStore.showDice" >< / PlayDice >
231+ < PlayDice v- if = " gameStore.showDice" / >
228232
229- < ScoreBoard>< / ScoreBoard>
233+ < div class = " flex gap-4" >
234+ < ScoreBoard / >
235+ < SmallBook / >
236+ < / div>
230237 < / div>
231238 < div class = " absolute top-8 right-8" >
232239 < / div>
233240 < div class = " absolute bottom-8 left-8" >
234- < LadderBoard>< / LadderBoard >
241+ < LadderBoard / >
235242 < / div>
236243 < div class = " absolute left-[40%] top-1/2 translate-y-[-50%] translate-x-[-50%] z-40 max-[1400px]:scale-75" >
237- < TableWithPlayer>< / TableWithPlayer>
238- < OpenedBook>< / OpenedBook>
244+ < TableWithPlayer / >
239245 < / div>
246+ < OpenedBook / >
247+ <!-- < div class = " absolute left-[40%] top-8 translate-y-[-50%] translate-x-[-50%] z-40 max-[1400px]:scale-75" >
248+ < OpenedBook>< / OpenedBook>
249+ < / div> -->
250+
240251 <!-- 右側排版 -->
241252 < div class = " absolute right-0 top-0 p-4 h-[100dvh]" >
242253 < div class = " h-full flex flex-col justify-between items-end" >
243254 < div class = " w-auto flex flex-row " >
244- < OpponentTable>< / OpponentTable >
255+ < OpponentTable / >
245256 < / div>
246257 < div class = " flex gap-8 max-w-[40vw] flex-row justify-end mb-4 " >
247- < WarehouseMix : class = " { 'show-warehouse': showWarehouse }" >< / WarehouseMix >
248- < MyState>< / MyState >
258+ < WarehouseMix : class = " { 'show-warehouse': showWarehouse }" / >
259+ < MyState / >
249260 < / div>
250- < BroadcastArea>< / BroadcastArea >
261+ < BroadcastArea / >
251262 < / div>
252263 < / div>
253264
254265 < div v- if = " gameStore.showVideo" >
255- < PlayVideo>
256- < / PlayVideo>
266+ < PlayVideo / >
257267 < / div>
258268 < div
259269 v- if = " gameStore.showSecretTable"
260270 class = " flex justify-center items-center bg-grey50 top-0 z-50 left-0 w-full h-full backgroundBlur absolute"
261271 >
262- < SecretSelectTable>< / SecretSelectTable >
272+ < SecretSelectTable / >
263273 < / div>
264274
265275 < HintBar
266276 v- if = " showHint1"
267277 : hint- text= " '輪到你了! 請選擇魔法!'"
268278 : change- color= " 'bg-purple text-white'"
269279 class = " z-50"
270- >
271- < / HintBar>
280+ / >
272281 < HintBar
273282 v- if = " showHintStart"
274283 : hint- text= " '按一下,成為魔法師吧!'"
275284 : change- color= " 'bg-purple text-white'"
276285 class = " z-50 cursor-pointer"
277286 @click= " clickEvent"
278- >
279- < / HintBar>
287+ / >
280288 < div
281289 v- if = " myTurn && !gameStore.spellFailed && !gameOver"
282290 class = " bg-grey50 top-0 left-0 w-full h-full backgroundBlur absolute"
283291 >
284- < SpellMagicBoard>< / SpellMagicBoard >
292+ < SpellMagicBoard / >
285293 < / div>
286294 < div
287295 v- if = " gameOver"
288296 class = " bg-grey50 z-50 top-1/4 left-0 w-full backgroundBlur absolute flex justify-center items-center"
289297 >
290- < FinalScoreBoard @exit= " handleExit" >< / FinalScoreBoard >
298+ < FinalScoreBoard @exit= " handleExit" / >
291299 < / div>
292300 < / div>
293301 <!-- < div>
0 commit comments