generated from VLADIMIR/template_frontend
add action
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user