Vue.js是當下很火的一個JavaScript MVVM(Model-View-ViewModel)庫,它是以數據驅動和組件化的思想構建的。相比于Angular.js,Vue.js提供了更加簡潔、更易于理解的API,使得我們能夠快速地上手并使用Vue.js。

上一期簡單講解了vue的基本語法,這一次我們做一個小項目,搭建一個簡單的圖書管理平臺,能夠讓我們更深刻的理解這門語言的妙用。
1、DEMO樣式
首先我們需要搭建一個簡單的demo樣式,推薦大家使用bootstrap,可以很快的搭建出一個清晰簡潔的頁面。
給大家分享一段我的代碼吧。
<div class="container">
<div class="col-md-6 col-md-offset-3">
<h2>Vue demo</h2>
<div id="app">
<table class="table table-hover ">
<caption></caption>
<thead>
<tr>
<th>序號</th>
<th>書名</th>
<th>作者</th>
<th>價格</th>
<th>操作</th>
</tr>
</thead>
</table>
<div id="add-book">
<legend>添加書籍</legend>
<div class="form-group">
<label for="group">書名</label>
<input type="text" class="form-control" id="group">
</div>
<div class="form-group">
<label for="author">作者</label>
<input type="text" class="form-control" id="author">
</div>
<div class="form-group">
<label for="price">價格</label>
<input type="text" class="form-control" id="price">
</div>
<button class="btn btn-primary btn-block">添加</button>
<button class="btn btn-primary btn-block">查詢</button>
</div>
<div id="update-book">
<legend>修改書籍</legend>
<div class="form-group">
<label for="group1">書名</label>
<input type="text" class="form-control" id="group1">
</div>
<div class="form-group">
<label for="author1">作者</label>
<input type="text" class="form-control" id="author1">
</div>
<div class="form-group">
<label for="price1">價格</label>
<input type="text" class="form-control" id="price1">
</div>
<button class="btn btn-primary btn-block">完成</button>
</div>
</div>
</div>
</div>另外有需要云服務器可以了解下創新互聯scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業上云的綜合解決方案,具有“安全穩定、簡單易用、服務可用性高、性價比高”等特點與優勢,專為企業上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
網站欄目:基于vue.js快速搭建圖書管理平臺-創新互聯
本文來源:http://www.yijiale78.com/article28/idjjp.html
成都網站建設公司_創新互聯,為您提供微信公眾號、營銷型網站建設、用戶體驗、移動網站建設、網站設計公司、品牌網站設計
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯