Skip to content

Commit

Permalink
Update index.demo-entry.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jahnli authored Jan 24, 2025
1 parent 88b4097 commit a3f958b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/discrete/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# 脱离上下文的 API DiscreteAPI

`2.29.1` 开始提供。

如果你想在 `setup` 外使用 `useDialog``useMessage``useNotification``useLoadingBar``useModal`,可以通过 `createDiscreteApi` 来构建对应的 API。

<n-alert title="注意" type="warning" :bordered="false">
1. 脱离上下文的 API 不会受 <n-text code>n-xxx-provider</n-text> 的影响,并且和应用上下文中对应组件会使用不同的 DOM 容器。如果需要的话,你需要手动同步这些信息。并且最好不要混用两类 API。2. 不要在 <n-text code>setup</n-text> 中调用 <n-text code>createDiscreteApi</n-text>,可能会有一些意外的问题出现。
</n-alert>

`2.29.1` 开始提供。

## 演示

```demo
Expand Down

0 comments on commit a3f958b

Please sign in to comment.