docs: update f&q (#5861)

This commit is contained in:
Aaron 2024-06-13 10:32:31 +08:00 committed by GitHub
parent 343941bf2f
commit e91d473ebd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 0 deletions

View File

@ -8,3 +8,19 @@ order: 6
`Extension` is a concept in G6 that collectively refers to all types of registrable content, including elements, behaviors, layouts, and plugins, among others.
`Plugin` represents a flexible extension mechanism provided by G6 and is a special type of `Extension`.
### Set Text Overflow Ellipsis
Taking `label` as an example, you can set `labelWordWrap` and `labelWordWrapWidth` to achieve text overflow ellipsis.
```typescript
{
labelText: 'This is a long text',
labelWordWrap: true,
labelWordWrapWidth: 50,
}
```
### Key Press Not Working
Some plugins or behaviors support configuring key press triggers. Please use standard key names, such as `Control`, `Shift`, `Alt`, `Meta`, as well as letters, numbers, symbols, and so on.

View File

@ -8,3 +8,19 @@ order: 6
`Extension` 是 G6 中的一个概念,是所有可注册内容的统称,包含元素、交互、布局、插件等。
`Plugin` 是 G6 提供的灵活扩展机制,是一种特殊的 `Extension`
### 设置文本超出省略
以 label 为例,设置 `labelWordWrap``labelWordWrapWidth` 即可实现文本超出省略。
```typescript
{
labelText: 'This is a long text',
labelWordWrap: true,
labelWordWrapWidth: 50,
}
```
### 按键不生效
一些插件或交互支持配置触发按键,请使用标准按键名:如 `Control`, `Shift`, `Alt`, `Meta`,以及字母、数字、符号等。