Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

300 feature support select cell range #316

Merged
merged 9 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "feat: add api selectCells #300\n\n",
"type": "patch",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
12 changes: 6 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions docs/assets/api/en/event/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,15 @@ Legend item hover to unhover events. **Legend exclusive event**

The parameter type of the event callback function:

```
{ model: any; value: any; event: PointerEvent };
```
## LEGEND_CHANGE

Color legend, size legend, this event is triggered after the user operates the legend range. **Legend exclusive event**

Parameter types of event callback function:

```
{ model: any; value: any; event: PointerEvent };
```
Expand Down
25 changes: 25 additions & 0 deletions docs/assets/api/en/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,31 @@ Listen to VChart chart events

Unlisten to VChart chart events

## selectCell(Function)

Select a cell

```
/**
* The effect of selecting a cell is the same as that of a cell selected by the mouse.
* @param col
* @param row
*/
selectCell(col: number, row: number): void
```

## selectCells(Function)

Select one or more cell ranges

```
/**
* Select a cell area, and you can set multiple areas to be selected at the same time
* @param cellRanges: CellRange[]
*/
selectCells(cellRanges: CellRange[]): void
```

## getCellStyle(Function)

Getting the style of a cell
Expand Down
9 changes: 9 additions & 0 deletions docs/assets/api/zh/event/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,15 @@ icon 图标点击事件。
{ model: any; value: any; event: PointerEvent };
```

## LEGEND_CHANGE

颜色图例,尺寸图例,用户操作图例范围后触发该事件。**图例专有事件**

事件回调函数的参数类型:

```
{ model: any; value: any; event: PointerEvent };
```
## MOUSEENTER_AXIS

鼠标进入到坐标轴上事件。**坐标轴专有事件**
Expand Down
24 changes: 24 additions & 0 deletions docs/assets/api/zh/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,30 @@ tableInstance.renderWithRecreateCells();
## offVChartEvent(Function)

解除监听 VChart 图表事件
## selectCell(Function)

选中某个单元格

```
/**
* 选中单元格 和鼠标选中单元格效果一致
* @param col
* @param row
*/
selectCell(col: number, row: number): void
```

## selectCells(Function)

选中一个或者多个单元格区域

```
/**
* 选中单元格区域,可设置多个区域同时选中
* @param cellRanges: CellRange[]
*/
selectCells(cellRanges: CellRange[]): void
```

## getCellStyle(Function)

Expand Down
32 changes: 32 additions & 0 deletions docs/assets/examples/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,38 @@
"link": "",
"option": ""
}
},
{
"path": "legend-color",
"title": {
"zh": "颜色图例",
"en": "legend-color"
},
"meta": {
"title": "color legend",
"keywords": "",
"category": "examples",
"group": "Component",
"cover": "https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/color-legend.png",
"link": "",
"option": ""
}
},
{
"path": "legend-size",
"title": {
"zh": "尺寸图例",
"en": "legend-size"
},
"meta": {
"title": "size legend",
"keywords": "",
"category": "examples",
"group": "Component",
"cover": "https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/size-legend.png",
"link": "",
"option": ""
}
}
]
},
Expand Down
Loading