1.0.12 • Published 7 years ago

vue-permission v1.0.12

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

vue-permission

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i vue-permission --save

Usage

import VuePermission 'vue-permission';

Vue.use(VuePermission);

Vue.permission.authorize({'create': true, 'del': false});

Vue.permission.hasPermission('del'); // console.log(false);

Vue.permission.god = true; // all permissions return true

Vue.permission.reset(); // clear the permissions and god flag.

// if u don't has permission the button will not show. and style display none.
<button v-permission='create'></button>

Example

Questions & Suggestions

Please open an issue here.

License

MIT

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago