vue-permission
v1.0.12
Published
A Simple Permission Plugin for Vue.
Downloads
21
Readme
vue-permission
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.