- [spell-card] Added comma and ingredients display
This commit is contained in:
@@ -31,9 +31,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="casting-ingredients">
|
<div class="casting-ingredients">
|
||||||
<p class="title">Nécessite</p>
|
<p class="title">Nécessite :</p>
|
||||||
<p class="content">
|
<p class="content">
|
||||||
<span v-for="(ingredient, index) in ingredients" :key="index">{{ ingredient }}</span>
|
<span v-for="(ingredient, index) in ingredients" :key="index">
|
||||||
|
{{ ingredient.name }}<span v-if="index != Object.keys(ingredients).length - 1">, </span>
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import spellcard from "./spell-card"
|
import spellcard from "./spell-card"
|
||||||
|
|
||||||
// API
|
// API
|
||||||
import { RepositoryFactory } from "../../../api/repositories"
|
import { RepositoryFactory } from "../../../api/repositories"
|
||||||
const spellsRepository = RepositoryFactory.get('spells')
|
const spellsRepository = RepositoryFactory.get('spells')
|
||||||
@@ -35,7 +35,7 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
const displaySpells = await this.fetchSpells();
|
const displaySpells = await this.fetchSpells();
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.spells = displaySpells.splice(0,10)
|
this.spells = displaySpells.slice(0, 10)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user