Button Permission
Example
vue
vue
<template>
<!-- Array -->
<n-button v-has-perm="['sys:user:add', 'sys:user:edit']" type="primary">
Add
</n-button>
<!-- String -->
<n-button v-has-perm="'sys:user:edit'" type="info"> Edit </n-button>
</template>1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Role Permission
Example
vue
vue
<template>
<!-- Array -->
<n-button v-has-role="['ADMIN', 'TEST']" type="primary"> Add </n-button>
<!-- String -->
<n-button v-has-role="'ADMIN'" type="info"> Edit </n-button>
</template>1
2
3
4
5
6
7
2
3
4
5
6
7
nuyoah