diff --git a/src/components/GameWindow.vue b/src/components/GameWindow.vue index c2018f2..055d997 100644 --- a/src/components/GameWindow.vue +++ b/src/components/GameWindow.vue @@ -17,6 +17,8 @@ type Action = { name: string text: string applications: Application[] + + isOpen: boolean } type Team = { @@ -72,8 +74,16 @@ function getTeam() { return res }) .then(data => { + const oldActions = team.value.actions + team.value = data const newActions = team.value?.actions + newActions.forEach(item => { + item.isOpen = true + }) + for (let i = 0; i < actions.value.length; i++) { + newActions[i].isOpen = oldActions[i].isOpen + } if (actions.value.length !== newActions?.length) { actions.value = newActions } @@ -216,14 +226,18 @@ onMounted(() => {
@@ -326,4 +340,9 @@ body { text-align: center; width: 200px; } + +.collapse-icon { + padding: 0 15px; + cursor: pointer; +}