基于vue.js的前端脚手架

基于webpack和vue的脚手架项目。vue全家桶: vue+vue-router+vuex

JavaScript 脚手架/样板

详细介绍

基于webpack和vue的脚手架项目

1.vue全家桶: vue+vue-router+vuex

2.UI框架: elementUI(使用最新测试版^2.0,生成环境请使用1.4.7)

3.ajax请求: axios

配置

1.前后端分离开发,测试时遇到接口调用跨域的问题请修改config/index.js文件

proxyTable: {
    '/': {
        target: 'http://真实服务器地址',
        changeOrigin: true,
        pathRewrite: {
        '^/': '/'
        }
    }
}

2.url开启history模式,如果还是喜欢之前的hash模式可以关闭 修改tools/config.js

// 关闭history模式
ENABLE_ROUTER_HISTORY = false; 

3.其他配置请查看tools/config.js文件,有对应注释

Build Setup

# 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.

推荐源码