feat(form): table支持rowkey配置

This commit is contained in:
roymondchen 2022-11-25 17:31:49 +08:00
parent 830c8d8747
commit ea8b863694
3 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@
v-if="model[modelName]"
ref="tMagicTable"
style="width: 100%"
:row-key="config.rowKey || 'id'"
:data="data"
:border="config.border"
:max-height="config.maxHeight"

View File

@ -633,6 +633,7 @@ export interface TableConfig extends FormItem {
enableFullscreen?: boolean;
fixed?: boolean;
itemExtra?: string | FilterFunction;
rowKey: string;
}
export interface GroupListConfig extends FormItem {

View File

@ -9,7 +9,7 @@
:max-height="bodyHeight"
:default-expand-all="defaultExpandAll"
:border="hasBorder"
:row-key="rowkeyName || 'c_id'"
:row-key="rowkeyName || 'id'"
:tree-props="{ children: 'children' }"
:empty-text="emptyText || '暂无数据'"
:span-method="objectSpanMethod"