Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.63 KB

README.md

File metadata and controls

55 lines (38 loc) · 1.63 KB

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);

// 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