All Projects → ktsn → Vuex Class

ktsn / Vuex Class

Licence: mit
Binding helpers for Vuex and vue-class-component

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Vuex Class

Vuex Module Decorators
TypeScript/ES7 Decorators to create Vuex modules declaratively
Stars: ✭ 1,714 (+0.35%)
Mutual labels:  vuex
Vue Netease Music
🎵 基于 Vue2、Vue-CLI3 的高仿网易云 mac 客户端播放器(PC) Online Music Player
Stars: ✭ 1,783 (+4.39%)
Mutual labels:  vuex
D2 Admin
An elegant dashboard
Stars: ✭ 11,012 (+544.73%)
Mutual labels:  vuex
Bento Starter
🍱 Full-Stack solution to quickly build PWA applications with Vue.js and Firebase
Stars: ✭ 1,519 (-11.07%)
Mutual labels:  vuex
Vue Spa Project
vue.js + vuex + vue-router + fetch + element-ui + es6 + webpack + mock 纯前端SPA项目开发实践
Stars: ✭ 118 (-93.09%)
Mutual labels:  vuex
Jsonapi Vuex
Use a JSONAPI api with a Vuex store, with data restructuring/normalization.
Stars: ✭ 123 (-92.8%)
Mutual labels:  vuex
Learn Vuex
🗂Source code for the Vuex for Everyone course
Stars: ✭ 113 (-93.38%)
Mutual labels:  vuex
Last Blog
仿GitHub风格个人博客, vue+vuex+koa+mongodb
Stars: ✭ 128 (-92.51%)
Mutual labels:  vuex
Blog
✒️记录技术的新博客,采用Vue3开发,使用GitHub API进行数据交互
Stars: ✭ 119 (-93.03%)
Mutual labels:  vuex
Vue Todos
vue最新实战项目教程,从零开始,一步一个脚印,循序渐进。跟着我一起学习vue吧!
Stars: ✭ 1,659 (-2.87%)
Mutual labels:  vuex
Vue Expenses
A simple expense tracking application
Stars: ✭ 117 (-93.15%)
Mutual labels:  vuex
Nuxt Api Example
Nuxt.js API Example using Vuex and axios
Stars: ✭ 118 (-93.09%)
Mutual labels:  vuex
Githoard
Desktop app that enables users to quickly clone git repositories
Stars: ✭ 123 (-92.8%)
Mutual labels:  vuex
Vue Auth Cognito
A Vue.js Vuex module for authentication using Amazon AWS Cognito
Stars: ✭ 115 (-93.27%)
Mutual labels:  vuex
Learnvue
Vue.js 源码解析
Stars: ✭ 11,516 (+574.24%)
Mutual labels:  vuex
Vue Ruby China
使用Vue.js框架搭建的ruby china山寨版,集成vue-router+vuex等
Stars: ✭ 113 (-93.38%)
Mutual labels:  vuex
Todolist Frontend Vuejs
Front-end application for Todolist Web application built with Laravel and Vue.js
Stars: ✭ 120 (-92.97%)
Mutual labels:  vuex
Questionnaire
📋 问卷系统
Stars: ✭ 128 (-92.51%)
Mutual labels:  vuex
Vue2 Manage
基于 vue + element-ui 的后台管理系统
Stars: ✭ 11,345 (+564.23%)
Mutual labels:  vuex
Vue2 Basic Demo
这里是关于学习vue2.0的相关例子和项目,欢迎一起学习!
Stars: ✭ 125 (-92.68%)
Mutual labels:  vuex

vuex-class

vuex-class Dev Token

Binding helpers for Vuex and vue-class-component

Dependencies

Installation

$ npm install --save vuex-class
# or
$ yarn add vuex-class

Example

import Vue from 'vue'
import Component from 'vue-class-component'
import {
  State,
  Getter,
  Action,
  Mutation,
  namespace
} from 'vuex-class'

const someModule = namespace('path/to/module')

@Component
export class MyComp extends Vue {
  @State('foo') stateFoo
  @State(state => state.bar) stateBar
  @Getter('foo') getterFoo
  @Action('foo') actionFoo
  @Mutation('foo') mutationFoo
  @someModule.Getter('foo') moduleGetterFoo

  // If the argument is omitted, use the property name
  // for each state/getter/action/mutation type
  @State foo
  @Getter bar
  @Action baz
  @Mutation qux

  created () {
    this.stateFoo // -> store.state.foo
    this.stateBar // -> store.state.bar
    this.getterFoo // -> store.getters.foo
    this.actionFoo({ value: true }) // -> store.dispatch('foo', { value: true })
    this.mutationFoo({ value: true }) // -> store.commit('foo', { value: true })
    this.moduleGetterFoo // -> store.getters['path/to/module/foo']
  }
}

Issue Reporting Guideline

Questions

For general usage question which is not related to vuex-class should be posted to StackOverflow or other Q&A forum. Such questions will be closed without an answer.

Bug Reports

Please make sure to provide minimal and self-contained reproduction when you report a bug. Otherwise the issue will be closed immediately.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].