Skip to content

Commit

Permalink
Merge pull request #1866 from VisActor/release/1.2.0
Browse files Browse the repository at this point in the history
[Auto release] release 1.2.0
  • Loading branch information
fangsmile committed Jun 6, 2024
2 parents 48b1059 + 1f04da1 commit 2d73fad
Show file tree
Hide file tree
Showing 72 changed files with 2,389 additions and 1,258 deletions.
72 changes: 18 additions & 54 deletions common/config/rush/pnpm-lock.yaml

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

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.1.2","mainProject":"@visactor/vtable","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.2.0","mainProject":"@visactor/vtable","nextBump":"minor"}]
27 changes: 24 additions & 3 deletions docs/assets/api/en/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ Get the data item of this cell
* Get the entire data record based on the row and column number
* @param {number} col col index.
* @param {number} row row index.
* @return {object} record.
* @return {object} record in ListTable. return Array<any> in PivotTable.
*/
getRecordByCell(col: number, row: number)
```
Expand Down Expand Up @@ -997,6 +997,27 @@ Get the displayed row number range of the table body part

Get aggregation summary value

```
/**
* Get the aggregate value based on the field
* @param field field name
* Returns an array, including the column number and the aggregate value array of each column
*/
getAggregateValuesByField(field: string | number)
```

**ListTable Proprietary**

## isAggregation(Function)

Determine whether it is an aggregate cell

```
isAggregation(col: number, row: number): boolean
```

**ListTable Proprietary**

## registerCustomCellStyle(Function)

Register a custom style
Expand All @@ -1010,12 +1031,12 @@ Custom cell style
- customStyleId: the unique id of the custom style
- customStyle: Custom cell style, which is the same as the `style` configuration in `column`. The final rendering effect is the fusion of the original style of the cell and the custom style.

## registerCustomCellStyleArrangement(Function)
## arrangeCustomCellStyle(Function)

Assign custom styles

```
registerCustomCellStyleArrangement: (cellPosition: { col?: number; row?: number; range?: CellRange }, customStyleId: string) => void
arrangeCustomCellStyle: (cellPosition: { col?: number; row?: number; range?: CellRange }, customStyleId: string) => void
```

- cellPosition: cell position information, supports configuration of single cells and cell areas
Expand Down
27 changes: 24 additions & 3 deletions docs/assets/api/zh/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ setRecords(records: Array<any>)
* 根据行列号获取整条数据记录
* @param {number} col col index.
* @param {number} row row index.
* @return {object} record.
* @return {object} record in ListTable. return Array<any> in PivotTable.
*/
getRecordByCell(col: number, row: number)
```
Expand Down Expand Up @@ -995,6 +995,27 @@ use case: 点击图例项后 更新过滤规则 来更新图表

获取聚合汇总的值

```
/**
* 根据字段获取聚合值
* @param field 字段名
* 返回数组,包括列号和每一列的聚合值数组
*/
getAggregateValuesByField(field: string | number)
```

**ListTable 专有**

## isAggregation(Function)

判断是否是聚合指单元格

```
isAggregation(col: number, row: number): boolean
```

**ListTable 专有**

## registerCustomCellStyle(Function)

注册自定义样式
Expand All @@ -1008,12 +1029,12 @@ registerCustomCellStyle: (customStyleId: string, customStyle: ColumnStyleOption
- customStyleId: 自定义样式的唯一 id
- customStyle: 自定义单元格样式,与`column`中的`style`配置相同,最终呈现效果是单元格原有样式与自定义样式融合

## registerCustomCellStyleArrangement(Function)
## arrangeCustomCellStyle(Function)

分配自定义样式

```
registerCustomCellStyleArrangement: (cellPosition: { col?: number; row?: number; range?: CellRange }, customStyleId: string) => void
arrangeCustomCellStyle: (cellPosition: { col?: number; row?: number; range?: CellRange }, customStyleId: string) => void
```

- cellPosition: 单元格位置信息,支持配置单个单元格与单元格区域
Expand Down
11 changes: 11 additions & 0 deletions docs/assets/changelog/en/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# v1.1.2

2024-06-04


**🔧 Configuration releated**

- **@visactor/vtable**: update vrender version

[more detail about v1.1.2](https://github.com/VisActor/VTable/releases/tag/v1.1.2)

# v1.1.1

2024-05-30
Expand Down
11 changes: 11 additions & 0 deletions docs/assets/changelog/zh/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# v1.1.2

2024-06-04


**🔧 项目配置**

- **@visactor/vtable**: update vrender version

[更多详情请查看 v1.1.2](https://github.com/VisActor/VTable/releases/tag/v1.1.2)

# v1.1.1

2024-05-30
Expand Down
102 changes: 102 additions & 0 deletions docs/assets/demo/en/animation/appear-animation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
category: examples
group: Animation
title: 入场动画
cover: https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/preview/appear-animation.gif
option: ListTable-columns-text#mergeCell
---

# Entry animation

Automatically merge cells with the same content through configuration

## Key configuration

- `animationAppear` Entry animation configuration
- `type` Entry animation type, currently supports `all` and `one-by-one`
- `direction` Entry animation direction, currently supports `row` and `column`
- `duration` The duration of a single animation, in milliseconds, `one-by-one`, the duration of one animation
- `delay` Animation delay, in milliseconds; `one-by-one` is the time difference between two animations, `all` is the delay of all animations

## Code demonstration

```javascript livedemo template=vtable

let tableInstance;
fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_data100.json')
.then((res) => res.json())
.then((data) => {

const columns =[
{
"field": "Category",
"title": "Category",
"width": "auto",
},
{
"field": "Sub-Category",
"title": "Sub-Category",
"width": "auto",
},
{
"field": "Order ID",
"title": "Order ID",
"width": "auto"
},
{
"field": "Customer ID",
"title": "Customer ID",
"width": "auto"
},
{
"field": "Product Name",
"title": "Product Name",
"width": "auto",
},
{
"field": "Region",
"title": "Region",
"width": "auto"
},
{
"field": "City",
"title": "City",
"width": "auto"
},
{
"field": "Order Date",
"title": "Order Date",
"width": "auto"
},
{
"field": "Quantity",
"title": "Quantity",
"width": "auto"
},
{
"field": "Sales",
"title": "Sales",
"width": "auto"
},
{
"field": "Profit",
"title": "Profit",
"width": "auto"
}
];

const option = {
records:data.slice(0,20),
columns,
widthMode:'standard',
animationAppear: {
duration: 300,
delay: 100,
type: 'one-by-one', // all
direction: 'row' // colunm
}
};
tableInstance = new VTable.ListTable(document.getElementById(CONTAINER_ID),option);
window['tableInstance'] = tableInstance;
})
```
Loading

0 comments on commit 2d73fad

Please sign in to comment.