Skip to content

cag2050/vue_product

Repository files navigation

vue_product_demo

A Vue.js project

基于vue-cli命令:vue init webpack [project_name]构建的项目,新加的功能:

  1. vue-resource(添加全局拦截器interceptors)
  2. vuex
  3. vuex-router-sync
  4. vue-progressbar
  5. normalize.css
  6. element-ui
  7. vue-router(添加按需加载的3种方式、全局路由控制beforeEachscrollBehavior

从接口取数据后,有2种处理方式:

  1. 将数据保存在store中,然后在组件中取store里state的值。
  2. 返回一个promise,在组件中操作这个promise。
    第一种方式适合只要求取接口值的情况。
    第二种方式适合对返回的数据再做一些处理的情况,灵活性高。

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 detailed explanation on how things work, checkout the guide and docs for vue-loader.

About

vue 项目结构

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published