Skip to content

Commit

Permalink
Merge branch 'develop' into feat/1623
Browse files Browse the repository at this point in the history
  • Loading branch information
LofiSu authored Jul 13, 2024
2 parents 2e37fca + 27af624 commit 6bcc254
Show file tree
Hide file tree
Showing 52 changed files with 3,684 additions and 420 deletions.
2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.5.1","mainProject":"@visactor/vtable","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.5.2","mainProject":"@visactor/vtable","nextBump":"patch"}]
22 changes: 22 additions & 0 deletions docs/assets/api/en/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -1208,3 +1208,25 @@ Hide the highlight line of the moved column or row
*/
hideMoverLine(col: number, row: number)
```

## disableScroll(Function)

Close the scrolling of the table. If you do not want the table content to scroll in the business scenario, you can call this method.

```
/** Turn off scrolling of the table */
disableScroll() {
this.eventManager.disableScroll();
}
```

## enableScroll(Function)

Enable scrolling of the table

```
/** Enable scrolling of the table */
enableScroll() {
this.eventManager.enableScroll();
}
```
22 changes: 22 additions & 0 deletions docs/assets/api/zh/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -1206,3 +1206,25 @@ interface ISortedMapItem {
*/
hideMoverLine(col: number, row: number)
```

## disableScroll(Function)

关闭表格的滚动,业务场景中如果有不期望表格内容滚动的话,可以调用该方法。

```
/** 关闭表格的滚动 */
disableScroll() {
this.eventManager.disableScroll();
}
```

## enableScroll(Function)

开启表格的滚动

```
/** 开启表格的滚动 */
enableScroll() {
this.eventManager.enableScroll();
}
```
4 changes: 3 additions & 1 deletion docs/assets/guide/en/data/data_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,15 @@ Example:
```javascript livedemo template=vtable
const option = {
container: document.getElementById(CONTAINER_ID),
indicatorsAsCol: false,
rowTree: [
{
dimensionKey: 'city',
value: 'beijing',
children: [
{
indicatorKey: 'income'
indicatorKey: 'income',
value: 'income'
}
]
},
Expand Down
2 changes: 2 additions & 0 deletions docs/assets/guide/en/edit/edit_cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ If verification is required, please customize the editor to implement the verifi
If this interface is not defined, the editing value will not be verified by default, and the interface will return false. If the verification fails, it will remain in the editing state.
If asynchronous verification is needed, you can return a Promise object. This Promise object should resolve to true upon successful verification and false upon verification failure.
## 9. Related APIs
```ts
Expand Down
1 change: 1 addition & 0 deletions docs/assets/guide/zh/data/data_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID)

```javascript livedemo template=vtable
const option = {
indicatorsAsCol: false,
rowTree: [
{
dimensionKey: 'city',
Expand Down
4 changes: 3 additions & 1 deletion docs/assets/guide/zh/edit/edit_cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ interface ListTableConstructorOptions {

需要校验的情况 请自定义编辑器实现校验函数`validateValue`

如未定义该接口则编辑值值默认不做校验,接口返回 false,校验失败则保留在编辑状态。
如未定义该接口则编辑值值默认不做校验,接口返回 false,校验失败则保留在编辑状态;

若需要实现异步校验,可以返回一个Promise对象,该Promise对象在校验成功时以真值解析,校验失败时以假值解析。

## 9. 相关 api

Expand Down
2 changes: 1 addition & 1 deletion packages/openinula-vtable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/openinula-vtable",
"version": "1.5.1",
"version": "1.5.2",
"description": "The openinula version of VTable",
"keywords": [
"openinula",
Expand Down
8 changes: 4 additions & 4 deletions packages/react-vtable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ const option = {
header: [
{
field: "0",
caption: "name",
title: "name",
},
{
field: "1",
caption: "age",
title: "age",
},
{
field: "2",
caption: "gender",
title: "gender",
},
{
field: "3",
caption: "hobby",
title: "hobby",
},
],
records: new Array(1000).fill(["John", 18, "male", "🏀"]),
Expand Down
Loading

0 comments on commit 6bcc254

Please sign in to comment.