- 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.
推薦閱讀
- Python從小白到大牛
- Selenium Design Patterns and Best Practices
- Mastering OpenCV 4
- Hands-On GPU:Accelerated Computer Vision with OpenCV and CUDA
- Apache Mahout Clustering Designs
- Python算法從菜鳥到達(dá)人
- Learning Python Design Patterns
- Oracle從入門到精通(第5版)
- Unity 2D Game Development Cookbook
- INSTANT Sinatra Starter
- Spring MVC+MyBatis開發(fā)從入門到項(xiàng)目實(shí)踐(超值版)
- Mastering Apache Storm
- ActionScript 3.0從入門到精通(視頻實(shí)戰(zhàn)版)
- Mastering PowerCLI
- Visual Basic語言程序設(shè)計(jì)上機(jī)指導(dǎo)與練習(xí)(第3版)