From 74262023eaa59acc6773285de8dcb40669ca9732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E9=9B=A8?= Date: Mon, 26 Dec 2022 10:08:15 +0800 Subject: [PATCH] docs: update doc (#39753) * feat: update doc * feat: update doc * feat: update doc * feat: update doc --- components/message/index.en-US.md | 2 ++ components/message/index.zh-CN.md | 2 ++ components/modal/index.en-US.md | 2 ++ components/modal/index.zh-CN.md | 2 ++ components/notification/index.en-US.md | 2 ++ components/notification/index.zh-CN.md | 2 ++ 6 files changed, 12 insertions(+) diff --git a/components/message/index.en-US.md b/components/message/index.en-US.md index 4dccbdf5c0aa..60ee591a3864 100644 --- a/components/message/index.en-US.md +++ b/components/message/index.en-US.md @@ -131,6 +131,8 @@ return ( **Note:** You must insert `contextHolder` into your children with hooks. You can use origin method if you do not need context connection. +> [App Package Component](/components/app-cn) can be used to simplify the problem of `useMessage` and other methods that need to manually implant contextHolder. + ### How to set static methods prefixCls ? You can config with [`ConfigProvider.config`](/components/config-provider#configproviderconfig-4130) diff --git a/components/message/index.zh-CN.md b/components/message/index.zh-CN.md index c0ddcb1f8f7d..90b13ad46fdf 100644 --- a/components/message/index.zh-CN.md +++ b/components/message/index.zh-CN.md @@ -132,6 +132,8 @@ return ( **异同**:通过 hooks 创建的 `contextHolder` 必须插入到子元素节点中才会生效,当你不需要上下文信息时请直接调用。 +> 可通过 [App 包裹组件](/components/app-cn) 简化 `useMessage` 等方法需要手动植入 contextHolder 的问题。 + ### 静态方法如何设置 prefixCls ? 你可以通过 [`ConfigProvider.config`](/components/config-provider-cn#configproviderconfig-4130) 进行设置。 diff --git a/components/modal/index.en-US.md b/components/modal/index.en-US.md index 1a5dbfbe6c1d..720755f8ac29 100644 --- a/components/modal/index.en-US.md +++ b/components/modal/index.en-US.md @@ -194,6 +194,8 @@ return ( **Note:** You must insert `contextHolder` into your children with hooks. You can use origin method if you do not need context connection. +> [App Package Component](/components/app-cn) can be used to simplify the problem of `useModal` and other methods that need to manually implant contextHolder. + ### How to disable motion? You can config `transitionName=""` and `maskTransitionName=""` to remove motion class. But you should note that these prop is internal usage which we don't promise exist in next major version. diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index f469a6f62ff5..eaebbdf1a3c4 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -195,6 +195,8 @@ return ( **异同**:通过 hooks 创建的 `contextHolder` 必须插入到子元素节点中才会生效,当你不需要上下文信息时请直接调用。 +> 可通过 [App 包裹组件](/components/app-cn) 简化 `useModal` 等方法需要手动植入 contextHolder 的问题。 + ### 如何关闭 Modal 动画? 你可以通过 `transitionName=""` 和 `maskTransitionName=""` 去除动画 CSS,但是需要注意的是。该方法为内部方法,我们不保证下个大版本重构时该属性会被保留。 diff --git a/components/notification/index.en-US.md b/components/notification/index.en-US.md index 244f66adedca..bfe4a5aa8e1f 100644 --- a/components/notification/index.en-US.md +++ b/components/notification/index.en-US.md @@ -115,6 +115,8 @@ return ( **Note:** You must insert `contextHolder` into your children with hooks. You can use origin method if you do not need context connection. +> [App Package Component](/components/app-cn) can be used to simplify the problem of `useNotification` and other methods that need to manually implant contextHolder. + ### How to set static methods prefixCls ? You can config with [`ConfigProvider.config`](/components/config-provider#configproviderconfig-4130) diff --git a/components/notification/index.zh-CN.md b/components/notification/index.zh-CN.md index 204287f2d892..575190b9a6f7 100644 --- a/components/notification/index.zh-CN.md +++ b/components/notification/index.zh-CN.md @@ -115,6 +115,8 @@ return ( **异同**:通过 hooks 创建的 `contextHolder` 必须插入到子元素节点中才会生效,当你不需要上下文信息时请直接调用。 +> 可通过 [App 包裹组件](/components/app-cn) 简化 `useNotification` 等方法需要手动植入 contextHolder 的问题。 + ### 静态方法如何设置 prefixCls ? 你可以通过 [`ConfigProvider.config`](/components/config-provider-cn#configproviderconfig-4130) 进行设置。