0.0.2 • Published 6 years ago

vuex_helper v0.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

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

This project is licensed under the MIT License - see the LICENSE.md file for details