- 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.
推薦閱讀
- 自己動手寫Java虛擬機
- Data Analysis with IBM SPSS Statistics
- PLC編程及應用實戰
- Fast Data Processing with Spark(Second Edition)
- Regression Analysis with Python
- Anaconda數據科學實戰
- jQuery從入門到精通(微課精編版)
- 百萬在線:大型游戲服務端開發
- TypeScript High Performance
- PyTorch生成對抗網絡編程
- MATLAB從入門到精通
- C# 7.0核心技術指南(原書第7版)
- 換個姿勢學C語言
- 精通Django 3 Web開發
- IBM Cognos 10 Report Studio Cookbook(Second Edition)