Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 843 Bytes

README.md

File metadata and controls

38 lines (30 loc) · 843 Bytes

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