日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 前端技术 > vue >内容正文

vue

vue 开发环境搭建

發布時間:2023/12/9 vue 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vue 开发环境搭建 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.創建vue項目

1.node js 生成項目,編譯項目

2.hbuilder 開發環境

1.下載安裝node js

http://nodejs.cn/download/

?

確認是否安裝成功

?

如果安裝不了 代碼錯誤2503

解決方法:

管理員命令運行cmd;

cd\

cd C:\Users\Administrator\Desktop

msiexec/package node-v6.3.1-x64.msi

(msi是版本號)

2.安裝 VUE CLI?

vue cli 是一個腳手架工具,用于生成一個基礎的vue應用。

npm install vue-cli -g

3.新建一個Vue項目

cd 目錄(你要把項目放在哪個目錄)

  • vue init webpack pname(你的項目名字);
  • ? Project description (A Vue.js project) vue-cli新建項目(項目描述);
  • ? Author (xhdx <zhuming3834@sina.com>) ;zhuming3834@sina.com(項目作者);
  • ? Vue build
    ? Runtime + Compiler: recommended for most users
    Runtime-only: about 6KB lighter min+gzip, but templates (or any Vue-specific HTML) are ONLY allowed in .vue files - render functions are required elsewhere
    這里選擇Runtime + Compiler: recommended for most users;

  • ? Install vue-router? (Y/n) y 是否使用vue-router,這里根據需求選擇;

  • ? Use ESLint to lint your code? (Y/n) y 是否使用ESLint,這里根據需求選擇;

  • ? Pick an ESLint preset (Use arrow keys)
    ? Standard (https://github.com/feross/standard)
    Airbnb (https://github.com/airbnb/javascript) none (configure it yourself) 這里選擇Standard (https://github.com/feross/standard)

  • ? Setup unit tests with Karma + Mocha? (Y/n) n 是否需要單元測試,這里根據需求選擇;

  • Setup e2e tests with Nightwatch? (Y/n) n是否需要單元測試,這里根據需求選擇;

  • cd pname(項目目錄);

  • npm install 安裝依賴

  • npm run dev 本地運行項目

?

?

?

?

?

?

?

?

?

?

?

?

?

默認瀏覽器會自動打開http://localhost:8080/#/,出現如下頁面:?

一共13步,一個vue-cli新建的模板項目就運行起來了。

轉載于:https://www.cnblogs.com/yubaibai/p/10457290.html

總結

以上是生活随笔為你收集整理的vue 开发环境搭建的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。