李林
2024-03-07 fa65e938ddb5c206be73ce5dc7f51437d6396e05
src/components/tool/value-table.vue
@@ -68,7 +68,7 @@
                  <span v-else>{{scope.row[a.label]}}</span>
               </template>
            </el-table-column>
            <el-table-column fixed="right" align="center" label="操作" :width="60 + data.do.length * 40"
            <el-table-column fixed="right" align="center" label="操作" :width="getWidth()"
               v-if="data.do.length > 0">
               <template slot-scope="scope">
                  <el-button v-for="(a, ai) in data.do" :key="ai" :type="a.type"
@@ -711,6 +711,13 @@
          this.$emit(val.method,row)
        }
      },
         getWidth(){
            let count = 0
            this.data.do.forEach(a=>{
               count += a.font.length
            })
            return count * 15 + 60 + 'px'
         }
      }
   }
</script>