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"
|
width="45"
|
||||||
></el-table-column>
|
></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>
|
<template v-slot="scope">{{ scope.$index + 1 + pagecontext * pagesize }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -570,20 +570,29 @@ export interface TableConfig extends FormItem {
|
|||||||
tableItems?: ColumnConfig[];
|
tableItems?: ColumnConfig[];
|
||||||
groupItems?: ColumnConfig[];
|
groupItems?: ColumnConfig[];
|
||||||
enableToggleMode?: boolean;
|
enableToggleMode?: boolean;
|
||||||
|
/** 最大行数 */
|
||||||
max?: number;
|
max?: number;
|
||||||
|
/** 最大高度 */
|
||||||
maxHeight?: number | string;
|
maxHeight?: number | string;
|
||||||
border?: boolean;
|
border?: boolean;
|
||||||
|
/** 显示行号 */
|
||||||
showIndex?: boolean;
|
showIndex?: boolean;
|
||||||
enum?: any[];
|
enum?: any[];
|
||||||
|
/** 是否显示添加按钮 */
|
||||||
addable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
|
addable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
|
||||||
|
/** 是否显示删除按钮 */
|
||||||
delete?: (model: any, index: number, values: any) => boolean | boolean;
|
delete?: (model: any, index: number, values: any) => boolean | boolean;
|
||||||
|
/** 是否显示导入按钮 */
|
||||||
importable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
|
importable?: (mForm: FormState | undefined, data: any) => boolean | 'undefined' | boolean;
|
||||||
|
/** 是否显示checkbox */
|
||||||
selection?: (mForm: FormState | undefined, data: any) => boolean | boolean | 'single';
|
selection?: (mForm: FormState | undefined, data: any) => boolean | boolean | 'single';
|
||||||
|
/** 新增的默认行 */
|
||||||
defaultAdd?: (mForm: FormState | undefined, data: any) => any;
|
defaultAdd?: (mForm: FormState | undefined, data: any) => any;
|
||||||
onSelect?: (mForm: FormState | undefined, data: any) => any;
|
onSelect?: (mForm: FormState | undefined, data: any) => any;
|
||||||
defautSort?: SortProp;
|
defautSort?: SortProp;
|
||||||
defaultSort?: SortProp;
|
defaultSort?: SortProp;
|
||||||
dropSort?: boolean;
|
dropSort?: boolean;
|
||||||
|
/** 是否显示全屏按钮 */
|
||||||
enableFullscreen?: boolean;
|
enableFullscreen?: boolean;
|
||||||
fixed?: boolean;
|
fixed?: boolean;
|
||||||
itemExtra?: string | FilterFunction;
|
itemExtra?: string | FilterFunction;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user