1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  | <template> 
 |      <div class="zt-table-column-button el-button el-link" :class="classObject" @click.stop="onClick" v-if="$hasPermission(perm)"> 
 |        <slot></slot> 
 |      </div> 
 |  </template> 
 |  <script> 
 |    export default { 
 |      name: 'ZtTableButton', 
 |      props: { 
 |        type: { 
 |          type: String, 
 |          default: 'primary' 
 |        }, 
 |        perm: {// 权限 
 |          type: String, 
 |          default: '' 
 |        } 
 |      }, 
 |      computed: { 
 |        classObject() { 
 |          let obj = {} 
 |          obj['el-link--' + this.type] = true 
 |          return obj 
 |        } 
 |      }, 
 |      methods: { 
 |        onClick() { 
 |          this.$emit('click') 
 |        } 
 |      } 
 |    } 
 |  </script> 
 |  <style> 
 |    .el-button.el-link { 
 |      font-size: 12px; 
 |      border: none; 
 |    } 
 |    .zt-table-column-button.el-button+.el-button { 
 |      margin-left: 6px; 
 |    } 
 |    /* .el-button.el-link.el-link--default { 
 |      color: #606266; 
 |    } */ 
 |  </style> 
 |  
  |