# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
For a detailed explanation on how things work, check out the guide and docs for vue-loader
难点问题:
1, 引用了 better-scroll , 点击事件出现次:
node_modules/scroll.vue
新增:stopPropagation: true
const DEFAULT_OPTIONS = { observeDOM: true, click: true, probeType: 1, scrollbar: false, pullDownRefresh: false, pullUpLoad: false, stopPropagation: true }
2, babel 兼容
.babelrc 文件
{ "presets": [ ["env", { "modules": false }], "stage-2" ], "plugins": [ "transform-runtime" ] }