- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 65字
- 2021-07-02 19:57:20
Prices
Let's now add thepricelist to our template as well.
index.html:
<p class="lists"> <hr> <p class="amenities list">...</p> <hr> <p class="prices list"> <p class="title"> <strong>Prices</strong> </p> <p class="content"> <p class="list-item" v-for="price in prices"> {{ price.title }}: <strong>{{ price.value }}</strong> </p> </p> </p> </p>
I'm sure you'll agree that looping a template is far easier than writing out every item. However, you may notice that there is still some common markup between these two lists. Later in the book we'll utilizecomponentsto make this part of the template even more modular.
推薦閱讀
- Mastering RabbitMQ
- Kubernetes實戰
- Instant Apache Stanbol
- 信息可視化的藝術:信息可視化在英國
- Java Web基礎與實例教程
- Mastering Rust
- Serverless架構
- Service Mesh實戰:基于Linkerd和Kubernetes的微服務實踐
- Raspberry Pi Robotic Projects(Third Edition)
- Learning Ionic
- Java7程序設計入門經典
- Mastering Android Studio 3
- Python機器學習開發實戰
- 零基礎學SQL(升級版)
- Learning Ext JS(Fourth Edition)