1.导入vant
cnpm i vant -S
import Vue from 'vue' import Vant from 'vant' import 'vant/lib/index.css' Vue.use(Vant)
2.
[lib-flexible 用于设置 rem
基准值,设置根字体的大小
postcss-pxtorem 是一款 postcss
插件,用于将单位转化为
cnpm i amfe-flexible -S
(2).
import 'amfe-flexible'
cnpm install postcss-pxtorem -D
(2)
module.exports = { plugins: { 'autoprefixer': { browsers: ['Android >= 4.0', 'iOS >= 8'] }, 'postcss-pxtorem': { rootValue: 37.5, propList: ['*'] } } }
3.
cnpm i axios -S
(2)
/** * 封装 axios 请求模块 */ import axios from "axios" const request = axios.create({ baseURL: "http://198.110.1.1/" // 基础路径 }) export default request