# vill-vuex

> a simple vuex demo

Latest version **1.0.1** (published 2019-03-22) · 0 weekly downloads

## Install

```sh
npm install vill-vuex
pnpm add vill-vuex
yarn add vill-vuex
bun add vill-vuex
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-03-22 |
| First published | 2019-03-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 2 |
| Unpacked size | 31.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | laternkiwis@aliyun.com |
| Maintainers | kiwis |
| Keywords | vue, vill-vuex |

## Links

- npm: https://www.npmjs.com/package/vill-vuex
- Repository: https://github.com/Harhao/vill-vuex
- Homepage: https://github.com/Harhao/vill-vuex#readme
- Issues: https://github.com/Harhao/vill-vuex/issues
- npm.io page: https://npm.io/package/vill-vuex

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.5.2
- [vue-router](https://npm.io/package/vue-router.md) ^3.0.1

## Recent versions

- 1.0.1 (latest) — 2019-03-22
- 1.0.0 — 2019-03-22

## README

# vill-vuex

> a vue plugins about data manage

## Build Setup

### install the plugin on bash and the sass module support

```
npm install vill-vuex --save-dev
```

### register the plugins on the vue project in the entry file (main.js)

```
import vuex from 'vill-vuex'
Vue.use(vuex);
```

### on the store file ,you can use it by the follow example

```
import Vue from "vue";
import Vuex from "../util/index";
Vue.use(Vuex);
export default new Vuex.Store({
  state: {
    name: "kiwis",
    age: 22,
    job: "front-end-engineer"
  },
  mutations: {
    increAge(state, n = 1) {
      state.age += n;
    }
  },
  actions:{
    plus(context,n){
      console.log(context);
      console.log(context.commit('increAge',n));
    }
  }
});

```
### in the main entry file ,you need import store file to vuejs options
```
import Vue from 'vue'
import App from './App'
import store from './store/index';
import router from "./router";
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  store,
  router,
  components: { App },
  template: '<App/>'
})

```

## License

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/vill-vuex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
