From ebb8e1fd49f89323d561b1f78547fc1bc129e3b7 Mon Sep 17 00:00:00 2001 From: gaoaoy <1042166043@qq.com> Date: 星期二, 12 三月 2024 09:08:37 +0800 Subject: [PATCH] 6 设备工具明细 功能调整 --- src/components/tool/value-table.vue | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/components/tool/value-table.vue b/src/components/tool/value-table.vue index 8d82289..c98d03a 100644 --- a/src/components/tool/value-table.vue +++ b/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> -- Gitblit v1.9.3