I"m going to do this function now
after each login, the backend will return the permissions of the current user to me:
"permissions": [
"account:update",
"account:list",
"account:findById",
"adveradvertiser:add"
],
I will store this data in localStore. With this "create advertiser" button, I will show it and hide it according to whether the data sent to me at the back end contains "adveradvertiser:add".
the first thing I think of is v-if, but here I don"t know how to iterate whether the permissions array contains adveradvertiser:add
<button class="btnYellow" v-if=""></button>