Skip to content

zhouyu1993/vue-demo

Repository files navigation

vue-csr

A Vue.js project [client-side rendering]

the falsework based on vue-cli

vue init webpack [name]

Build Setup

# change branch to dev
git checkout dev

# install dependencies
npm install # Or yarn 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 detailed explanation on how things work, Please look at these:

Other configuration

  • config/index.jsconfig.dev.proxyTable 配置本地开发环境的接口跨域代理
  • config/index.js 中配置 build.assetsSubDirectorybuild.assetsPublicPath 来设置生产环境的静态文件路径。package.jsonscripts.deploy 来设置对应正确上传路径(开发服务器)
  • static/manifest.jsonindex.html 设置项目基本配置,如项目名称、描述、业务 id,静态资源路径
  • src/router/index.js 设置 router.base
  • src/router/routes.js 配置页面路由
  • z-index 建议
    • 普通 absolute < 10
    • 普通 fixed < 50
    • 弹窗类 fixed 90 - 99
    • 通用组件 fixed 2000 - 3000

Pages