#项目开发 ###1环境准备:
1、nodejs安装
node -v
v14.16.0
npm -v
7.6.3
2、创建项目:
https://cli.vuejs.org/zh/guide/
安装vue cli:
npm install --global vue-cli
创建一个基于 webpack 模板的新项目:
vue init webpack my-project
安装依赖:
npm install stylus --save
npm install stylus@0.54.5 --save
npm install stylus-loader --save
npm install stylus-loader@3.0.1 --save
7.1
1rem = html font-size = 50 px
安装 fastclick : npm install --save fastclick
引入 iconfont
在webpack修改别名:'styles': resolve('src/assets/styles'),
需要重启服务
7.3
轮播图
npm install vue-awesome-swiper@2.6.7 --save
A Vue.js project
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
For a detailed explanation on how things work, check out the guide and docs for vue-loader.