resolve issue of addItem, removeItem, update definition of get source()

This commit is contained in:
2024-01-27 15:47:15 +08:00
parent ac605895c5
commit fc61731c7d
2 changed files with 44 additions and 16 deletions

View File

@@ -207,7 +207,9 @@ export class Grid {
*/
onSorted?: (array?: Array<GridColumnSortDefinition>) => void;
/** 获取数据数组 */
/** 返回所有数据的数据(未过滤) */
get allSource(): Array<GridItem>;
/** 获取数据数组(已过滤) */
get source(): Array<GridItem>;
/** 设置数据,并刷新列表 */
set source(list: Array<GridItem>);
@@ -224,8 +226,6 @@ export class Grid {
/** 设置 Grid 滚动偏移量 */
set scrollTop(top: number);
/** 获取已过滤后的当前列表中的数据数组 */
get sourceFiltered(): Array<GridItem>;
/** 获取 Grid 的页面元素 */
get element(): HTMLElement;
/** 获取当前 Grid 是否已发生改变 */