@idealworld/task-table v0.1.0-beta.1 / IwProps / TableEventProps
Interface: TableEventProps
表格事件属性
Table event props
此处定义了表格的各类需要外部实现的事件。
Here defines various events of the table that need to be implemented externally.
Properties
clickCell()?
optional
clickCell: (clickedRecordPk
,clickedColumnName
,byLayoutId
,byLayoutKind
) =>Promise
<void
>
点击单元格
Click cell
Parameters
• clickedRecordPk: any
点击的数据主键 / Clicked data primary key
• clickedColumnName: string
点击的列名 / Clicked column name
• byLayoutId: string
所在布局ID / Layout ID
• byLayoutKind: LayoutKind
所在布局类型 / Layout kind
Returns
Promise
<void
>
Defined in
copyData()?
optional
copyData: (targetRecordPks
) =>Promise
<void
>
复制数据
Copy data
Parameters
• targetRecordPks: any
[]
要复制的数据主键 / Data primary keys to be copied
Returns
Promise
<void
>
Defined in
deleteData()?
optional
deleteData: (deletedRecordPks
) =>Promise
<void
>
删除数据
Delete data
NOTE: 删除数据时,需要同时删除子数据 / When deleting data, you need to delete sub-data at the same time
Parameters
• deletedRecordPks: any
[]
要删除的数据主键 / Data primary keys to be deleted
Returns
Promise
<void
>
Defined in
deleteLayout()?
optional
deleteLayout: (deletedLayoutId
) =>Promise
<void
>
删除布局
Delete layout
Parameters
• deletedLayoutId: string
删除的布局ID / Deleted layout ID
Returns
Promise
<void
>
Defined in
loadData()
loadData: (
quickSearchContent
?,filter
?,sort
?,group
?,agg
?,hideSubData
?,byGroupValue
?,slice
?,returnColumnNames
?,returnOnlyAgg
?) =>Promise
<DataResp
|DataGroupResp
[]>
Parameters
• quickSearchContent?: string
快速搜索内容(需要启用 TableProps#quickSearch) / Quick search content(Need to enable TableProps#quickSearch)
• filter?: FilterDataProps
过滤(需要启用 TableProps#filter) / Filter(Need to enable TableProps#filter)
• sort?: SortDataProps
排序(需要启用 TableProps#sort) / Sorts(Need to enable TableProps#sort)
• group?: GroupDataProps
分组(需要启用 TableProps#group) / Group(Need to enable TableProps#group)
• agg?: AggDataProps
聚合(需要启用 TableProps#agg) / Agg(Need to enable TableProps#agg)
• hideSubData?: boolean
是否隐藏子数据 / Whether to hide sub-data
• byGroupValue?: any
分组值,当分组及分组值存在时仅加载对应分组值的数据 / Group value, when group and group value exist, only load the data of the corresponding group value
• slice?: DataQuerySliceReq
分片 / Slice
• returnColumnNames?: string
[]
返回的列名 / Returned column names
• returnOnlyAgg?: boolean
仅返回聚合数据 / Only return aggregated data
Returns
Promise
<DataResp
| DataGroupResp
[]>
数据或分组数据 / Data or grouped data
Defined in
loadDictItems()?
optional
loadDictItems: (dictName
,filterValue
?,slice
?) =>Promise
<DictItemsResp
>
Parameters
• dictName: string
字典名 / Dictionary name
• filterValue?: any
过滤值 / Filter value
• slice?: DataQuerySliceReq
分片 / Slice
Returns
Promise
<DictItemsResp
>
字典项列表 / Dictionary item list
Defined in
loadDictItemsWithMultiConds()?
optional
loadDictItemsWithMultiConds: (conds
,slice
?) =>Promise
<object
>
Parameters
• conds
条件 / Conditions
• slice?: DataQuerySliceReq
分片 / Slice
Returns
Promise
<object
>
字典项列表 / Dictionary item list
Defined in
loadEditableData()?
optional
loadEditableData: (checkRecordPks
) =>Promise
<EditableDataResp
>
加载可编辑数据
Load editable data
Parameters
• checkRecordPks: any
[]
要检查的数据主键 / Data primary keys to be checked
Returns
Promise
<EditableDataResp
>
Defined in
loadHolidays()?
optional
loadHolidays: (startTime
,endTime
) =>Promise
<Date
[]>
Parameters
• startTime: Date
开始时间 / Start time
• endTime: Date
结束时间 / End time
Returns
Promise
<Date
[]>
假日列表 / Holidays
Defined in
modifyData()?
optional
modifyData: (changedRecords
) =>Promise
<void
>
修改数据
Modify data
Parameters
• changedRecords: object
[]
要修改的数据 / Data to be modified
Returns
Promise
<void
>
Defined in
modifyLayout()?
optional
modifyLayout: (changedLayoutId
,changedLayoutProps
) =>Promise
<void
>
修改布局
Modify layout
Parameters
• changedLayoutId: string
修改的布局ID / Changed layout ID
• changedLayoutProps: LayoutModifyProps
修改的布局属性 / Changed layout properties
Returns
Promise
<void
>
Defined in
modifyStyles()?
optional
modifyStyles: (changedStyleProps
) =>Promise
<void
>
修改样式
Modify style
Parameters
• changedStyleProps: Partial
<TableStyleProps
>
修改的样式属性 / Modified style properties
Returns
Promise
<void
>
Defined in
newData()?
optional
newData: (newRecords
) =>Promise
<void
>
新建数据
Create new data
Parameters
• newRecords: object
[]
要新建的数据 / Records to be created
Returns
Promise
<void
>
Defined in
newLayout()?
optional
newLayout: (newLayoutProps
) =>Promise
<string
>
Parameters
• newLayoutProps: LayoutProps
新建布局属性 / New layout properties
Returns
Promise
<string
>
新建布局ID / New layout ID
Defined in
selectData()?
optional
selectData: (selectedRecordPks
) =>Promise
<void
>
选择数据
Select data
Parameters
• selectedRecordPks: any
[]
选择的数据主键 / Selected data primary keys
Returns
Promise
<void
>