Skip to content

Commit

Permalink
Merge pull request #1413 from VisActor/develop
Browse files Browse the repository at this point in the history
merge develop
  • Loading branch information
fangsmile authored Mar 29, 2024
2 parents c6b389f + fb85cd9 commit 7267ec0
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: when click cell should not trigger drag_select_end event #1410\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
1 change: 1 addition & 0 deletions docs/assets/guide/en/cell_type/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ VTable supports setting various styles for text type data. The following are the
- `underlineOffset`: The distance between underline and text.
- `lineThrough`: Set the dash for the cell text content.
- `textStick`: Set whether the text of the cell has an adsorption effect \[The text can dynamically adjust the position when scrolling]
- `textStickBaseOnAlign`: When the cell text has an adsorption effect [the text can dynamically adjust its position when scrolling], the basis for adsorption is the horizontal alignment of the cell. For example, when `textStickBaseOnAlign` is `true` and `textAlign` is `'center'`, the text will be adsorbed to the horizontal center of the cell; otherwise, it will be adsorbed to the left or right edge of the cell (depending on the scroll position)
- `autoWrapText`: Sets whether cells wrap themselves.
- `lineClamp`: Set the maximum number of rows in a cell, you can set number or'auto ', if set to'auto', it will be automatically calculated

Expand Down
1 change: 1 addition & 0 deletions docs/assets/guide/en/theme_and_style/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Contains the following configuration items:
### Text adsorption effect

`textStick`: Set whether the text of the cell has an adsorption fruit \[Dynamically adjust the position of the cell content when scrolling]
`textStickBaseOnAlign`: When the cell text has an adsorption effect [the text can dynamically adjust its position when scrolling], the basis for adsorption is the horizontal alignment of the cell. For example, when `textStickBaseOnAlign` is `true` and `textAlign` is `'center'`, the text will be adsorbed to the horizontal center of the cell; otherwise, it will be adsorbed to the left or right edge of the cell (depending on the scroll position) )

### Cell Tag

Expand Down
1 change: 1 addition & 0 deletions docs/assets/guide/zh/cell_type/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ VTable 支持为文本类型数据设置多样化的样式,以下为文本类
- `underlineOffset`:下划线与文字的间隔距离。
- `lineThrough`:为单元格文本内容设置中划线。
- `textStick`:设置单元格的文本是否带有吸附效果【当滚动时文本可动态调整位置】
- `textStickBaseOnAlign`:当单元格的文本有吸附效果【当滚动时文本可动态调整位置】时,吸附的基准是单元格的水平对齐方式。例如当`textStickBaseOnAlign``true`时,`textAlign``'center'`时,文本会吸附在单元格的水平中心位置;否则就会吸附在单元格左边缘或右边缘(依据滚动位置决定)
- `autoWrapText`:设置单元格是否自动换行。
- `lineClamp`:设置单元格的最大行数, 可设置 number 或者'auto',如果设置为'auto', 则会自动计算

Expand Down
1 change: 1 addition & 0 deletions docs/assets/guide/zh/theme_and_style/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ style 提供了一系列的单元格配置式,简要介绍如下。
### 文本吸附效果

`textStick`:设置元格的文本是否带有吸附果【当滚动时可动态调整单元格内容位置】
`textStickBaseOnAlign`:当单元格的文本有吸附效果【当滚动时文本可动态调整位置】时,吸附的基准是单元格的水平对齐方式。例如当`textStickBaseOnAlign``true`时,`textAlign``'center'`时,文本会吸附在单元格的水平中心位置;否则就会吸附在单元格左边缘或右边缘(依据滚动位置决定)

### 单元格标记

Expand Down
8 changes: 4 additions & 4 deletions docs/assets/option/en/column/progressbar-column-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Specify the column type as 'progressbar', cellType can be omitted and defaults t
isProgressbar = true
) }}

##${prefix} min(number) = 0
##${prefix} min(number|Function) = 0

**Configuration item exclusive to progressbar type**

The minimum value of the progress bar display range
The minimum value of the progress bar display range, support dynamic acquisition through functions

##${prefix} max(number) = 100
##${prefix} max(number|Function) = 100

**Configuration item exclusive to progressbar type**

The maximum value of the progress bar display range
The maximum value of the progress bar display range, support dynamic acquisition through functions

##${prefix} barType(string) = 'default'

Expand Down
3 changes: 3 additions & 0 deletions docs/assets/option/en/common/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ Mouse cursor style when hovering over the cell
#${prefix} textStick(boolean)
Set whether the text in the cell has a sticking effect 【Text can dynamically adjust its position when scrolling】

#${prefix} textStickBaseOnAlign(boolean)
When the cell text has an adsorption effect [the text can dynamically adjust its position when scrolling], the basis for adsorption is the horizontal alignment of the cell. For example, when `textStickBaseOnAlign` is `true` and `textAlign` is `'center'`, the text will be adsorbed to the horizontal center of the cell; otherwise, it will be adsorbed to the left or right edge of the cell (depending on the scroll position)

#${prefix} marked(MarkedPropertyDefine)
Set whether the cell has a marked style
{{ use: common-marked(
Expand Down
3 changes: 3 additions & 0 deletions docs/assets/option/en/common/theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Or you can directly define a custom theme:
#${prefix} underlayBackgroundColor(string)
The color filled in the canvas outside the table drawing area

#${prefix} cellInnerBorder(boolean)
Whether the cell draws an inner border. If true, the border of the border cell close to the border will be hidden.

#${prefix} bodyStyle(Object)

Body cell style configuration
Expand Down
8 changes: 4 additions & 4 deletions docs/assets/option/en/indicator/progressbar-indicator-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Specify the column type as 'progressbar', cellType can be omitted with the defau
isProgressbar = true,
) }}

##${prefix} min(number) = 0
##${prefix} min(number|Function) = 0

**progressbar type exclusive configuration item**

The minimum data for the progress bar display range
The minimum data for the progress bar display range, support dynamic acquisition through functions

##${prefix} max(number) = 100
##${prefix} max(number|Function) = 100

**progressbar type exclusive configuration item**

The maximum data for the progress bar display range
The maximum data for the progress bar display range, support dynamic acquisition through functions

##${prefix} barType(string) = 'default'

Expand Down
8 changes: 4 additions & 4 deletions docs/assets/option/zh/column/progressbar-column-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
isProgressbar = true
) }}

##${prefix} min(number) = 0
##${prefix} min(number|Function) = 0

**progressbar 类型专属配置项**

进度条展示范围的最最小数据
进度条展示范围的最最小数据,支持通过函数动态获取

##${prefix} max(number) = 100
##${prefix} max(number|Function) = 100

**progressbar 类型专属配置项**

进度条展示范围的最最小数据
进度条展示范围的最最小数据,支持通过函数动态获取

##${prefix} barType(string) = 'default'

Expand Down
3 changes: 3 additions & 0 deletions docs/assets/option/zh/common/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@
#${prefix} textStick(boolean)
设置单元格的文本是否带有吸附效果【当滚动时文本可动态调整位置】

#${prefix} textStickBaseOnAlign(boolean)
当单元格的文本有吸附效果【当滚动时文本可动态调整位置】时,吸附的基准是单元格的水平对齐方式。例如当`textStickBaseOnAlign``true`时,`textAlign``'center'`时,文本会吸附在单元格的水平中心位置;否则就会吸附在单元格左边缘或右边缘(依据滚动位置决定)。

#${prefix} marked(MarkedPropertyDefine)
设置单元格是否有标记样式
{{ use: common-marked(
Expand Down
3 changes: 3 additions & 0 deletions docs/assets/option/zh/common/theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ VTable.themes.ARCO.extend({
#${prefix} underlayBackgroundColor(string)
表格绘制范围外的canvas上填充的颜色

#${prefix} cellInnerBorder(boolean)
单元格是否绘制内边框,如果为true,边界单元格靠近边界的边框会被隐藏

#${prefix} bodyStyle(Object)

body单元格的样式配置
Expand Down
8 changes: 4 additions & 4 deletions docs/assets/option/zh/indicator/progressbar-indicator-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
isProgressbar = true,
) }}

##${prefix} min(number) = 0
##${prefix} min(number|Function) = 0

**progressbar 类型专属配置项**

进度条展示范围的最最小数据
进度条展示范围的最最小数据,支持通过函数动态获取

##${prefix} max(number) = 100
##${prefix} max(number|Function) = 100

**progressbar 类型专属配置项**

进度条展示范围的最最小数据
进度条展示范围的最最小数据,支持通过函数动态获取

##${prefix} barType(string) = 'default'

Expand Down
6 changes: 5 additions & 1 deletion packages/vtable/src/event/listener/table-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,11 @@ export function bindTableGroupListener(eventManager: EventManager) {
table.stateManager.endFillSelect();
}
const eventArgsSet: SceneEvent = getCellEventArgsSet(e);
if (eventArgsSet.eventArgs && (table as any).hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
if (
table.eventManager.isDraging &&
eventArgsSet.eventArgs &&
(table as any).hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)
) {
const cellsEvent: MousePointerMultiCellEvent = {
event: e.nativeEvent,
cells: [],
Expand Down

0 comments on commit 7267ec0

Please sign in to comment.