@@ -10,10 +10,10 @@
name: 'auth',
props: {
auths: {
- type: Object
+ type: String | Array
},
router: {
+ type: Array
mulit: {
type: Boolean,
@@ -35,6 +35,10 @@
methods: {
hasAuths(menus) {
const auths = this.auths
+ if(!auths) { // 判断是否有权限
+ return false
+ }
+ // console.log(auths)
if(typeof auths === 'object') {
let sum = 0
for(const auth of auths) {
@@ -9,7 +9,6 @@
</p>
<div class="btnList">
-
<auth :auths="['/main']">
<el-button type="primary" @click="codeStatus = true">预报名链接</el-button>
</auth>