Skip to content

add list of boats alive or dead#6

Open
alexfauquette wants to merge 1 commit into
masterfrom
add-legende
Open

add list of boats alive or dead#6
alexfauquette wants to merge 1 commit into
masterfrom
add-legende

Conversation

@alexfauquette

Copy link
Copy Markdown

image

Comment thread src/components/Boats.vue
<li
v-for="boat in boatsInfos"
:key="boat.name"
v-bind:class="{sunk: boat.isSunk}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tu peux écrire ça :class= si tu veux 🙂
https://v1.vuejs.org/guide/syntax.html#Shorthands

Comment thread src/components/Boats.vue
}
.boats-liste {
list-style: none;
padding: 100% 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pourquoi 100% ?

Comment thread src/components/Boats.vue
},
computed: {
boatsInfos: function() {
const x = Object.keys(this.boats)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x => boatsInformation

ca me semble hyper compliqué quand l'objet passé en props a déjà quasiment toutes les infos, on veut forcément l'ordonner?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants