| | |
| | | <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" |
| | |
| | | this.$emit(val.method,row) |
| | | } |
| | | }, |
| | | getWidth(){ |
| | | let count = 0 |
| | | this.data.do.forEach(a=>{ |
| | | count += a.font.length |
| | | }) |
| | | return count * 15 + 60 + 'px' |
| | | } |
| | | } |
| | | } |
| | | </script> |