Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add list of boats alive or dead #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

alexfauquette
Copy link

image

<li
v-for="boat in boatsInfos"
:key="boat.name"
v-bind:class="{sunk: boat.isSunk}"
Copy link
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

}
.boats-liste {
list-style: none;
padding: 100% 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

pourquoi 100% ?

},
computed: {
boatsInfos: function() {
const x = Object.keys(this.boats)
Copy link
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