Skip to content

Commit

Permalink
docs: add docs about textStick enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Aug 16, 2024
1 parent 88e8fa8 commit f92aad5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/assets/guide/en/cell_type/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ VTable supports setting various styles for text type data. The following are the
- `underlineDash`: Dashed style of underline.
- `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]
- `textStick`: Set whether the text of the cell has an adsorption effect \[The text can dynamically adjust the position when scrolling].Can be set to true to enable, or set to 'horizontal' or 'vertical' to specify in which direction to snap only.
- `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
2 changes: 1 addition & 1 deletion docs/assets/guide/en/theme_and_style/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,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]
`textStick`: Set whether the text of the cell has an adsorption fruit \[Dynamically adjust the position of the cell content when scrolling].Can be set to true to enable, or set to 'horizontal' or 'vertical' to specify in which direction to snap only.
`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
2 changes: 1 addition & 1 deletion docs/assets/guide/zh/cell_type/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ VTable 支持为文本类型数据设置多样化的样式,以下为文本类
- `underlineDash`:下划线的虚线样式。
- `underlineOffset`:下划线与文字的间隔距离。
- `lineThrough`:为单元格文本内容设置中划线。
- `textStick`:设置单元格的文本是否带有吸附效果【当滚动时文本可动态调整位置】
- `textStick`:设置单元格的文本是否带有吸附效果【当滚动时文本可动态调整位置】,可以设置为 true 开启, 或者设置 'horizontal' 或 'vertical' 指定仅在哪个方向吸附。
- `textStickBaseOnAlign`:当单元格的文本有吸附效果【当滚动时文本可动态调整位置】时,吸附的基准是单元格的水平对齐方式。例如当`textStickBaseOnAlign``true`时,`textAlign``'center'`时,文本会吸附在单元格的水平中心位置;否则就会吸附在单元格左边缘或右边缘(依据滚动位置决定)
- `autoWrapText`:设置单元格是否自动换行。
- `lineClamp`:设置单元格的最大行数, 可设置 number 或者'auto',如果设置为'auto', 则会自动计算
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/guide/zh/theme_and_style/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ style 提供了一系列的单元格配置式,简要介绍如下。

### 文本吸附效果

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

### 单元格标记
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/option/en/common/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ Mouse cursor style when hovering over the cell
prefix = ${prefix}
) }}

#${prefix} textStick(boolean)
Set whether the text in the cell has a sticking effect 【Text can dynamically adjust its position when scrolling】
#${prefix} textStick(boolean | 'horizontal' | 'vertical')
Set whether the text in the cell has a sticking effect 【Text can dynamically adjust its position when scrolling】.Can be set to true to enable, or set to 'horizontal' or 'vertical' to specify in which direction to snap only.

#${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)
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/option/zh/common/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@
prefix = ${prefix}
) }}

#${prefix} textStick(boolean)
设置单元格的文本是否带有吸附效果【当滚动时文本可动态调整位置】
#${prefix} textStick(boolean | 'horizontal' | 'vertical')
设置单元格的文本是否带有吸附效果【当滚动时文本可动态调整位置】,可以设置为 true 开启, 或者设置 'horizontal' 或 'vertical' 指定仅在哪个方向吸附。

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

0 comments on commit f92aad5

Please sign in to comment.