使用vue2+element+vue-admin-template创建单页应用小记-1.安装框架环境

  1. 安装node.js
  2. 安装vue-cli,npm install vue-cli(若想要自己重新创建应用,则安装vue-cli,若使用其他开源项目二次开发,则无需安装)

            当国外镜像反应慢,可更改为淘宝镜像,以下三个方法可选

    1. 通过config命令

      npm config set registry https://registry.npm.taobao.org 
      npm info underscore (如果上面配置正确这个命令会有字符串response)
    2. 命令行指定

      npm install --registry=https://registry.npm.taobao.org
    3. 编辑 ~/.npmrc 加入下面内容

      registry = https://registry.npm.taobao.org
  3. 安装vue-admin-template
    1. 仓库下载
      git clone https://github.com/PanJiaChen/vue-admin-template.git
    2. 安装依赖包
      npm install
    3. 运行应用
      npm run dev
    4. git hub地址:https://github.com/PanJiaChen/vue-admin-template
  4.  
  5. 参考
    1. element原版在线演示地址https://panjiachen.github.io/vue-element-admin/
    2. element原版代码仓库https://github.com/PanJiaChen/vue-element-admin
    3. vue-admin-template教程链接:https://segmentfault.com/a/1190000009275424
  6.  

猜你喜欢

转载自blog.csdn.net/onlyjin/article/details/82455351
今日推荐