Browse Source

修改条件

lex-xin 4 years ago
parent
commit
734c1034f4
2 changed files with 6 additions and 3 deletions
  1. 6 2
      src/components/Auth/index.vue
  2. 0 1
      src/views/teamBuild/forecastName.vue

+ 6 - 2
src/components/Auth/index.vue

@@ -10,10 +10,10 @@
     name: 'auth',
     props: {
       auths: {
-        type: Object
+        type: String | Array
       },
       router: {
-        type: Object
+        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) {

+ 0 - 1
src/views/teamBuild/forecastName.vue

@@ -9,7 +9,6 @@
         </p>
 
         <div class="btnList">
-
             <auth :auths="['/main']">
               <el-button type="primary" @click="codeStatus = true">预报名链接</el-button>
             </auth>