Newline Pending Merge

    vue-permission

    1.0.12 • Public • Published

    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

    Keywords

    none

    Install

    npm i vue-permission

    DownloadsWeekly Downloads

    4

    Version

    1.0.12

    License

    MIT

    Unpacked Size

    172 kB

    Total Files

    17

    Last publish

    Collaborators

    • alex-zhang