Skip to content

jiereal/vuex_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vuex_helper

帮助工具方法

Installation

    npm install -S vuex_helper

Example

    import createNamespacedStore from 'vuex_helper';
    import Vuex from 'vuex';

    const demo = createNamespacedStore('nameSpace-demo', {
        state: {
            key1: ''
        },
        mutations: {},
        ...
    });

    const store = new Vuex.Store({
    	modules: {
    		demo
    	},
    	strict: process.env.NODE_ENV !== 'production'
    });

    // set module state
    store.commit('nameSpace-demo/key1.set', 'key1')

Contribution

If you find a bug or want to contribute to the code or documentation, you can help by submitting an issue or a pull request .

License

MIT

Releases

No releases published

Packages

No packages published