李林
2024-03-13 eb2f43c595f6e0602c74ba8516b6324ffcab3e59
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"
@@ -471,7 +471,8 @@
               }
            } else {
               delete row.orderBy
               this.$emit(val.method, row)
               this.$parent[val.method](row)
               // this.$emit(val.method, row)
            }
         },
         saveUpData() {
@@ -711,6 +712,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>