vue2.0一安装的插件详解

时间:2021-03-27 03:18:36

babel-runtime 对ES语法转义

fastclick  移动端300ms兼容

babel-polyfill 兼容Ie浏览器

 //babel-polyfill引用   
推荐采用webpack入口文件加一句代码的配置
'babel-polyfill':'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import fastclick from 'fastclick' //fastclick引用
import store from './store' import 'common/stylus/index.styl'
Vue.config.productionTip = false
fastclick.attach(document.body) //fastclick调用
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
template: '<App/>',
components: { App }
})