GithubHelp home page GithubHelp logo

hhy5277 / vue-vuex-veevalidate-vueresource-github Goto Github PK

View Code? Open in Web Editor NEW

This project forked from g-bruin/vue-vuex-veevalidate-vueresource-github

0.0 1.0 0.0 1.11 MB

Vue 全家桶 + 前端实现登录拦截、登出、校验、购物车等功能

JavaScript 95.79% Vue 4.21%

vue-vuex-veevalidate-vueresource-github's Introduction

cart

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

本案例根据vuex购物车模块加以学习和修改

1. 登录模块

模拟登录信息存储在localStorage:
let user = {};
let token = null
modules/login.js 登录模块局部状态存储
含有对应分发 Action 和 提交 Mutations

2. 购物车模块

modules/cart.js 购物车模块局部状态存储
含有对应分发 Action 和 提交 Mutations
添加到购物车和删除购物车数据操作

3. 商品数据模块

modules/production.js 商品数据模块局部状态存储
含有对应分发 Action 和 提交 Mutations
获取商品,商品数量加减操作

4. api模块

index.js 使用vue-resource封装request请求模块
shop.js 定义商品数据信息供使用

5. 数据校验模块

使用 vee-validate 进行数据校验,里面涉及初步基本使用,
对应其他规则请移步[github](https://github.com/logaretm/vee-validate)

vue-vuex-veevalidate-vueresource-github's People

Contributors

g-bruin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.