Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/koishijs/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Mar 17, 2024
2 parents 32856f6 + e305b69 commit 7139af4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zh-CN/api/core/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ type FieldCollector<K extends string> =
- **config:** [`Command.Config`](./context.md#ctx-command) 指令的配置
- 返回值:`Command` 注册或修改的指令
注册或修改子指令。子指令会继承当期指令的上下文。参见[指令的多级结构](../../guide/basic/command.md#指令的多级结构)章节。
注册或修改子指令。子指令会继承当期指令的上下文。参见 [子指令](../../manual/usage/command.md#子指令) 和 [注册子指令](../../guide/basic/command.md#注册子指令) 章节。
### cmd.parse(input)
Expand Down
15 changes: 15 additions & 0 deletions zh-CN/api/message/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ foo:
<chat-message nickname="Koishi">Hello, world!</chat-message>
</chat-panel>

这个组件也可以配合插值使用:

```html
<i18n path="foo.bar">{'Koishi'}</i18n>
```

```yaml
foo:
bar: Hello, {0}!
```

<chat-panel>
<chat-message nickname="Koishi">Hello, Koishi!</chat-message>
</chat-panel>

### 时间 (i18n:time) <badge>会话+广播</badge>

- **value:** 时间长度(毫秒)
Expand Down
4 changes: 2 additions & 2 deletions zh-CN/schema/basic/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ code: |
支持传入一些额外的选项:

- `allowCreate`:是否允许创建目录和上传文件
- `extensions`:可选的文件的扩展名列表,扩展名全需要以 `.` 开头;特别地其中如果包含 `directory` 则表示可以选择文件夹
- `filters`:可选的文件的扩展名列表,扩展名全需要以 `.` 开头;特别地其中如果包含 `directory` 则表示可以选择文件夹

```ts
export default Schema.object({
path1: Schema.path(),
path2: Schema.path({
extensions: ['.png', '.jpg', 'directory'],
filters: ['.png', '.jpg', 'directory'],
}),
})
```

0 comments on commit 7139af4

Please sign in to comment.