Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Switcheversenken
Switcheversenken Frontend
Commits
4b8137e9
Commit
4b8137e9
authored
Oct 07, 2020
by
satan
Browse files
move required ship list
parent
9a380fdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
4b8137e9
<
template
>
<div>
<div
v-if=
"phase === 'setup'"
class=
"card"
>
<div
class=
"card-body"
>
<div
class=
"card-body
d-flex
"
>
<v-grid
v-model:grid=
"myGrid"
@
clicked=
"edit(myGrid, $event)"
/>
<ul>
<template
v-for=
"l in Math.max(myGrid.width, myGrid.height)"
>
<li
v-if=
"required[l] || myGrid.shipCount(l)"
:key=
"l"
:style=
"`color:$
{
(required[l] || 0) === myGrid.shipCount(l) ? 'green' : 'red'
}`"
>
{{
l
}}
er:
{{
myGrid
.
shipCount
(
l
)
}}
von
{{
required
[
l
]
||
0
}}
</li>
</
template
>
</ul>
</div>
<div
class=
"card-footer btn-group"
>
<button
class=
"btn btn-danger"
@
click=
"myGrid.reset()"
>
Reset
</button>
...
...
@@ -22,22 +35,7 @@
<v-grid
v-model:grid=
"otherGrid"
/>
</div>
</div>
<ul
v-if=
"phase === 'setup'"
>
<template
v-for=
"l in Math.max(myGrid.width, myGrid.height)"
>
<li
v-if=
"required[l] || myGrid.shipCount(l)"
:key=
"l"
:style=
"`color:$
{
(required[l] || 0) === myGrid.shipCount(l) ? 'green' : 'red'
}`"
>
{{
l
}}
er:
{{
myGrid
.
shipCount
(
l
)
}}
von
{{
required
[
l
]
||
0
}}
</li>
</
template
>
</ul>
<br
/>
<textarea
readonly
v-text=
"json"
/>
<!-- <textarea readonly v-text="json" /> -->
</div>
</template>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment