iter(g330): 表格列支持自定义单元格渲染
This commit is contained in:
+1
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user