mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-20 12:49:19 +08:00
feat(form): table配置支持showIndex用于控制行号
This commit is contained in:
parent
34b628cc07
commit
eb03ce358f
@ -76,7 +76,7 @@
|
||||
width="45"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column width="60" label="序号" v-if="showIndex">
|
||||
<el-table-column width="60" label="序号" v-if="showIndex && config.showIndex">
|
||||
<template v-slot="scope">{{ scope.$index + 1 + pagecontext * pagesize }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -570,20 +570,29 @@ export interface TableConfig extends FormItem {
|
||||
tableItems?: ColumnConfig[];
|
||||
groupItems?: ColumnConfig[];
|
||||
enableToggleMode?: boolean;
|
||||
/** 最大行数 */
|
||||
max?: number;
|
||||
/** 最大高度 */
|
||||
maxHeight?: number | string;
|
||||
border?: boolean;
|
||||
/** 显示行号 */
|
||||
showIndex?: boolean;
|
||||
enum?: any[];
|
||||
/** 是否显示添加按钮 */
|
||||
addable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
|
||||
/** 是否显示删除按钮 */
|
||||
delete?: (model: any, index: number, values: any) => boolean | boolean;
|
||||
/** 是否显示导入按钮 */
|
||||
importable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
|
||||
/** 是否显示checkbox */
|
||||
selection?: (mForm: FormState | undefined, data: any) => boolean | boolean | 'single';
|
||||
/** 新增的默认行 */
|
||||
defaultAdd?: (mForm: FormState | undefined, data: any) => any;
|
||||
onSelect?: (mForm: FormState | undefined, data: any) => any;
|
||||
defautSort?: SortProp;
|
||||
defaultSort?: SortProp;
|
||||
dropSort?: boolean;
|
||||
/** 是否显示全屏按钮 */
|
||||
enableFullscreen?: boolean;
|
||||
fixed?: boolean;
|
||||
itemExtra?: string | FilterFunction;
|
||||
|
Loading…
x
Reference in New Issue
Block a user