1. Create a project (the process of the Vue project is not much to say)
2.CNPM Install Vux--save
3. In the build/webpack.base.conf.js configuration:
Const Vuxloader = require (' Vux-loader ')
Put the first module.exports assignment variable let webpackconfig ={inside the code does not move}
And this one on the bottom.
Module.exports = Vuxloader.merge (webpackconfig, {plugins: [' Vux-ui ', ' progress-bar ', ' Duplicate-style ') ]})
4. InstallationVux-loaderUsing commandscnpm Install vux-loader-d
5. cnpm Install less less-loader--save-dev To compile correctly LessSource
6.cnpm Install Yaml-loader--save-devTo correctly read the language file
7.index.htmlPortal page<meta name= "viewport" content= "width=device-width,initial-scale=1,user-scalable=0" >
8.Main.jsInside Configuration:
(Requires installation of dependentcnpm Install Fastclick--save)
Const Fastclick = require (' Fastclick ')
Fastclick.attach (document.body)Remove the click Delay for 300 seconds
(Requires installation of dependentcnpm Install Axios--save)
Const Axios = require (' Axios ')
vue.prototype. $ajax = Axios;
9.index.htmlInside introducedthe REM adaptive layout of JS, it is necessary to useJQare also introduced here to ensure performance.
Vue+vux+es6+webpack Mobile Side Common configuration steps