@aimerthyr/virtual-table 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -69,7 +69,12 @@ export declare interface VTableBodyCellProps<TData = any> {
69
69
  column: VTableColumn;
70
70
  row: TData;
71
71
  rowIndex: number;
72
- isEditing: boolean;
72
+ /** 编辑模式
73
+ * row => 整行编辑
74
+ * cell => 单元格编辑
75
+ * null => 未处于编辑态
76
+ * */
77
+ isEditingMode: 'row' | 'cell' | null;
73
78
  }
74
79
 
75
80
  /** 表体样式配置 */
@@ -241,8 +246,12 @@ export declare interface VTableInstance<TData = any> {
241
246
  tanstackTable: Table<TData>;
242
247
  /** 滚动到指定下标(从 0 开始,默认是平滑滚动) */
243
248
  scrollToIndex: (index: number, behavior?: 'auto' | 'smooth') => void;
244
- /** 设置当前编辑行 (传 null 代表退出编辑态) */
245
- setEditingRow: (rowId: string | number | null) => void;
249
+ /** 设置编辑状态
250
+ * 1. columnKey 为空,则为行编辑
251
+ * 2. columnKey 不为空,则为单元格编辑
252
+ * 3. rowId 传 null,清除编辑状态
253
+ */
254
+ setEditingState: (rowId: string | number | null, columnKey?: string | null) => void;
246
255
  }
247
256
 
248
257
  export declare interface VTableLoadMoreConfig {
@@ -266,6 +275,14 @@ export declare interface VTablePaginationConfig {
266
275
  }
267
276
 
268
277
  export declare interface VTablePaginationExtraProps {
278
+ /** 是否显示总计 */
279
+ showTotal?: boolean;
280
+ /** 是否显示每页条数选择器 */
281
+ showSizeChanger?: boolean;
282
+ /** 总计文本 */
283
+ totalText?: string;
284
+ /** 每页条数选择器文本 */
285
+ pageSizeText?: string;
269
286
  }
270
287
 
271
288
  /**