add action

This commit is contained in:
2026-03-21 00:29:21 +07:00
parent 7b620dffd4
commit dd41cd08dd
2 changed files with 31 additions and 16 deletions
+2 -16
View File
@@ -6,26 +6,12 @@ import VueQrcode from '@chenfengyuan/vue-qrcode';
import BeltBlock from './BeltBlock.vue';
import MetalPlate from './MetalPlate.vue';
import GameHeader from './GameHeader.vue';
import type { Application } from './application';
import type { Action } from './action';
import type { Door } from './door';
const router = useRouter();
const route = useRoute();
type Action = {
id: string
place: string
name: string
text: string
image: string
applications: Application[]
hidden: boolean
doors: Door[]
isOpen: boolean
buttons: Door[]
}
type Team = {
name: string
actions: Action[]
@@ -94,7 +80,7 @@ function getTeam() {
}
for (let i = 0; i < team.value.actions.length; i++) {
const element = team.value.actions[i];
team.value.actions[i].buttons = element.doors.filter((door) => { return door.show })
team.value.actions[i].buttons = element.doors.filter((door: Door) => { return door.show })
}
})
.catch(error => {