提供rem适配,ajax结合store鉴权,节流防抖公共方法,内存方法
axios, core-js, postcss-pxtorem, vant, vue, vue-router, vuex
main.js
import ainitsss from "aaa-mobile-init";
Vue.use(ainitsss);
Vue.use(ainitsss.app, {
routes: router,
stores: store
});
routes.js
let demo = [
{
path: "/",
name: "about",
component: () => import(/* webpackChunkName: "about" */ "./views/Home.vue")
},
{
path: "/about",
name: "about",
component: () => import(/* webpackChunkName: "about" */ "./views/About.vue")
},
{
path: "/cpage",
name: "cpage",
component: () => import(/* webpackChunkName: "about" */ "./views/Cpage.vue")
}
]
export default [].concat(demo);
store.js
export default {
state: {},
mutations: {},
actions: {}
};
###rem
npm install -S postcss-pxtorem
package.js修改
"postcss": {
"plugins": {
"autoprefixer": {
"browsers": [
"Android >= 4.0",
"iOS >= 7"
]
},
"postcss-pxtorem": {
"rootValue": 37.5,
"minPixelValue": 5,
"unitPrecision": 5,
"propList": [
"*"
],
"selectorBlackList": []
}
}
},