aaa-mobile-init

0.1.2 • Public • Published

aaa-mobile-init

提供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": []
      }
    }
  },

Readme

Keywords

none

Package Sidebar

Install

npm i aaa-mobile-init

Weekly Downloads

1

Version

0.1.2

License

ISC

Unpacked Size

23.9 kB

Total Files

16

Last publish

Collaborators

  • qzss