vue.js急急如律令

來源:互聯網
上載者:User

標籤:

1.安裝腳手架

使用腳手架工具 vue-cli 可以快速地構建項目:單檔案 Vue 組件,熱載入,儲存時檢查代碼,單元測試等。

# 全域安裝 vue-cli
$ npm install -g vue-cli

 

2.建立項目
# 建立一個基於 "webpack" 模板的新項目"my-project" 
$ vue init webpack my-project
# 安裝依賴,走你
$ cd my-project
$ npm install
 webstorm:
1)設定javascript language version 為 ES6

 
2)會出現一直掃描檔案的情況,exclude檔案夾node_modules即可

 
 
3.添加組件

$ npm install vuex --save-dev
[email protected] node_modules\vuex

$ npm install vue-router --save-dev
[email protected] node_modules\vue-router

$ npm install vue-resource --save-dev
[email protected] node_modules\vue-resource

$ npm install vux --save-dev
[email protected] node_modules\vux
├── [email protected]                                                                                                                                                                                                       
├── [email protected]                                                                                                                                                                                                      
├── [email protected]                                                                                                                                                                                                      
├── [email protected]                                                                                                                                                                                                          
├── [email protected]                                                                                                                                                                                                         
├── [email protected]                                                                                                                                                                                                         
├── [email protected]                                                                                                                                                                                                          
├── [email protected]                                                                                                                                                                                                           
├── [email protected]                                                                                                                                                                                                       
├── [email protected]                                                                                                                                                                                                            
├── [email protected]                                                                                                                                                                                                              
├── [email protected]                                                                                                                                                                                                          
├── [email protected]                                                                                                                                                                                                         
└── [email protected]

4.問題多多

1)events.js:141 throw er; // Unhandled ‘error‘ event

原因:tomcat佔用了8080連接埠

2)vue cannot resolve module ‘vux/x-input‘

原因:build檔案夾中的設定檔缺失

3)記憶體溢出

原因不詳~

vue.js急急如律令

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.