Skip to content

Commit

Permalink
fix(Table): 🐛 滚动行支持非虚拟场景 (#532)
Browse files Browse the repository at this point in the history
* fix(Table): 🐛 滚动行支持非虚拟场景

* chore: backup

---------

Co-authored-by: catye <[email protected]>
Co-authored-by: Uyarn <[email protected]>
  • Loading branch information
3 people authored Jan 22, 2025
1 parent f174012 commit 22e1de3
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 7 deletions.
Binary file modified db/TDesign.db
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/products/tdesign-react/src/table/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
refreshTable | \- | \- | 必需。全部重新渲染表格
scrollColumnIntoView | `(colKey: string)` | \- | 必需。横向滚动到指定列,呈现在可视范围内
scrollToElement | `(params: ComponentScrollToElementParams)` | \- | 必需。虚拟滚动场景,纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
scrollToElement | `(params: ComponentScrollToElementParams)` | \- | 必需。纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`

### BaseTableCol

Expand Down
2 changes: 1 addition & 1 deletion packages/products/tdesign-react/src/table/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export interface BaseTableInstanceFunctions<T extends TableRowData = TableRowDat
*/
scrollColumnIntoView: (colKey: string) => void;
/**
* 虚拟滚动场景,纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
* 纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
*/
scrollToElement: (params: ComponentScrollToElementParams) => void;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/products/tdesign-vue-next/src/table/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ scroll-y | `(params: { e: WheelEvent })` | 已废弃。表格内容纵向滚动
-- | -- | -- | --
refreshTable | \- | \- | 必需。全部重新渲染表格
scrollColumnIntoView | `(colKey: string)` | \- | 必需。横向滚动到指定列,呈现在可视范围内
scrollToElement | `(params: ComponentScrollToElementParams)` | \- | 必需。虚拟滚动场景,纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
scrollToElement | `(params: ComponentScrollToElementParams)` | \- | 必需。纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`

### BaseTableCol

Expand Down
2 changes: 1 addition & 1 deletion packages/products/tdesign-vue-next/src/table/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export interface BaseTableInstanceFunctions<T extends TableRowData = TableRowDat
*/
scrollColumnIntoView: (colKey: string) => void;
/**
* 虚拟滚动场景,纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
* 纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
*/
scrollToElement: (params: ComponentScrollToElementParams) => void;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/products/tdesign-vue/src/table/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ scroll-y | `(params: { e: WheelEvent })` | 已废弃。表格内容纵向滚动
-- | -- | -- | --
refreshTable | \- | \- | 必需。全部重新渲染表格
scrollColumnIntoView | `(colKey: string)` | \- | 必需。横向滚动到指定列,呈现在可视范围内
scrollToElement | `(params: ComponentScrollToElementParams)` | \- | 必需。虚拟滚动场景,纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
scrollToElement | `(params: ComponentScrollToElementParams)` | \- | 必需。纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`

### BaseTableCol

Expand Down
2 changes: 1 addition & 1 deletion packages/products/tdesign-vue/src/table/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export interface BaseTableInstanceFunctions<T extends TableRowData = TableRowDat
*/
scrollColumnIntoView: (colKey: string) => void;
/**
* 虚拟滚动场景,纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
* 纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`
*/
scrollToElement: (params: ComponentScrollToElementParams) => void;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -11849,7 +11849,7 @@
"field_type": [],
"field_default_value": "",
"field_enum": "",
"field_desc_zh": "虚拟滚动场景,纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`",
"field_desc_zh": "纵向滚动到指定行。示例:`scrollToElement({ index: 100, top: 80, time: 200, behavior: 'smooth' })`",
"field_desc_en": null,
"field_required": 1,
"event_input": "(params: ComponentScrollToElementParams)",
Expand Down

0 comments on commit 22e1de3

Please sign in to comment.