@yzfe/vuex-helper
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-alpha.0 • Public • Published

vuex 的辅助函数

主要是 写 getter, mutation, action 的时候可以提供类型 推导

使用

import { getter, mutation, action, decorator } from '@app/vuex-helper'

/*** state ***/
let state = {
    name: 'Allenice'
}

/*** getters ***/
let getters = getter(state, {})

/*** mutations ***/
let mutations = mutation(state, {})

/*** actions ***/
let actions = action(state, {})

/*** module store ***/
let store = {
    namespaced: true,
    state,
    getters,
    mutations,
    actions
}

Readme

Keywords

none

Package Sidebar

Install

npm i @yzfe/vuex-helper

Weekly Downloads

0

Version

2.0.0-alpha.0

License

MIT

Unpacked Size

2.81 kB

Total Files

4

Last publish

Collaborators

  • allenice
  • allenmo
  • vfasky