【文件属性】:
文件名称:vuex-model-helper:帮助您更快乐地使用vuex和v-model
文件大小:543KB
文件格式:ZIP
更新时间:2021-05-18 10:25:44
yarn vue eslint jest travis-ci
Vuex模型帮助器
帮助您更快乐地使用vuex和v-model
安装
yarn add vuex-model-helper
# or by npm
npm install --save vuex-model-helper
如何使用vuex-model-helper
使用mutationGenerator()生成您的v模型突变
import Vuex from 'vuex' ;
import { mutationGenerator } from 'vuex-model-helper' ;
const mutations = {
... mutationGenerator ( [
'userName' ,
] ) ,
} ;
const state = {
userName : '' ,
} ;
const store = new Vuex . Store ( {