Skip to content

Commit

Permalink
i18n 带插值的用法 (#158)
Browse files Browse the repository at this point in the history
Co-authored-by: Shigma <[email protected]>
  • Loading branch information
MirrorCY and shigma authored Mar 17, 2024
1 parent bf9b0b4 commit 9cd509c
Showing 1 changed file with 15 additions and 0 deletions.
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

0 comments on commit 9cd509c

Please sign in to comment.