- 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.
推薦閱讀
- 少兒人工智能趣味入門:Scratch 3.0動畫與游戲編程
- Oracle WebLogic Server 12c:First Look
- 數(shù)據(jù)庫系統(tǒng)教程(第2版)
- ReSharper Essentials
- Learning RxJava
- Mastering Google App Engine
- Mastering Python Networking
- Arduino家居安全系統(tǒng)構(gòu)建實戰(zhàn)
- Statistical Application Development with R and Python(Second Edition)
- Managing Microsoft Hybrid Clouds
- 平面設(shè)計經(jīng)典案例教程:CorelDRAW X6
- Learning Zimbra Server Essentials
- Visual C++ 開發(fā)從入門到精通
- 計算機視覺實戰(zhàn):基于TensorFlow 2
- Implementing OpenShift