Browse Source

w-grid表格将列配置中的title函数入参修改为与format一致(value,row)

main
likunming 2 months ago
parent
commit
86eea82e7e
  1. 2
      io.sc.platform.core.frontend/src/platform/components/grid/Td.vue

2
io.sc.platform.core.frontend/src/platform/components/grid/Td.vue

@ -70,7 +70,7 @@ const titleComputed = computed(() => {
if (tools.table.columns.length > 0) { if (tools.table.columns.length > 0) {
const column = tools.table.columns.find((item) => item['name'] === props.col.name); const column = tools.table.columns.find((item) => item['name'] === props.col.name);
if (column && column['title'] && typeof column['title'] === 'function') { if (column && column['title'] && typeof column['title'] === 'function') {
return column.title({ grid: tools.instance, row: toRaw(props.scope.row), value: props.scope.row[props.col.name] }); return column.title(props.scope.row[props.col.name], toRaw(props.scope.row));
} else if (column && column['title']) { } else if (column && column['title']) {
return column['title']; return column['title'];
} }

Loading…
Cancel
Save