feat: 数据库表数据支持字段设置、表格宽度自适应调整

This commit is contained in:
meilin.huang
2023-06-29 11:49:14 +08:00
parent 1bc53b4c80
commit d9807b1bf0
8 changed files with 138 additions and 92 deletions

View File

@@ -105,8 +105,7 @@
</template>
<template #default="scope" v-else>
<span>{{ item.formatFunc ? item.formatFunc(scope.row[item.prop]) : scope.row[item.prop]
}}</span>
<span>{{ item.getValueByData(scope.row)}}</span>
</template>
</el-table-column>
@@ -224,7 +223,7 @@ watch(() => props.data, (newValue: any) => {
if (newValue.length > 0) {
props.columns.forEach(item => {
if (item.autoWidth && item.show) {
item.minWidth = TableColumn.flexColumnWidth(item.prop, item.label, props.data) + item.addWidth
item.autoCalculateMinWidth(props.data);
}
})
}