iter(g330): 表格列支持自定义单元格渲染

This commit is contained in:
HIsheR
2026-10-27 02:03:09 +08:00
parent ffb4f6c4d5
commit 20290f67a4
7 changed files with 22 additions and 9 deletions
+1 -1
View File
@@ -1498,7 +1498,7 @@ const content = h(
columns: [
{ key: 'name', header: '姓名', sortable: true, width: 160 },
{ key: 'age', header: '年龄', sortable: true, align: 'right', width: 100, format: (v) => `${v} 岁` },
{ key: 'city', header: '城市', align: 'center', width: 'flex' },
{ key: 'city', header: '城市', align: 'center', width: 'flex', render: (row) => tag({ label: row.city, variant: row.city === '上海' ? 'info' : 'default' }) }, // 自定义单元格:本列画标签而非纯文本,格内点击不触发整行回调
],
pageSize: 5,
selected: picked,