export default {
// 按钮权限
methods: {
showBtn(code) {
return (
this.$store.state.user.userInfo.roles &&
this.$store.state.user.userInfo.roles.points.includes(code)
)
}
}
}
// 按钮
v-if="showBtn('employees_del_button')"
标签:src,code,showButton,mixin,js,state,showBtn,store
From: https://www.cnblogs.com/strundent/p/16882876.html