diff --git a/src/dialog/README.zh-CN.md b/src/dialog/README.zh-CN.md index 46989a87b..e26fa5835 100644 --- a/src/dialog/README.zh-CN.md +++ b/src/dialog/README.zh-CN.md @@ -119,7 +119,7 @@ Dialog.confirm({ ### 全局方法 -通过 `app.use` 注册 Dialog 组件后,会自动在 app 的所有子组件上挂载 `$dialog` 方法,在所有组件内部都可以直接调用此方法。 +通过 `app.use` 全局注册 Dialog 组件后,会自动在 app 的所有子组件上挂载 `$dialog` 方法,在所有组件内部都可以直接调用此方法。 ```js export default { @@ -131,6 +131,8 @@ export default { }; ``` +> Tips: 由于 setup 选项中无法访问 this,因此不能使用上述方式,请通过 import 引入。 + ### 组件调用 如果需要在弹窗内嵌入组件或其他自定义内容,可以使用组件调用的方式。 diff --git a/src/notify/README.zh-CN.md b/src/notify/README.zh-CN.md index 93f512a02..3d5368537 100644 --- a/src/notify/README.zh-CN.md +++ b/src/notify/README.zh-CN.md @@ -79,7 +79,7 @@ Notify({ ### 全局方法 -通过 `app.use` 注册 Notify 组件后,会自动在 app 的所有子组件上挂载 `$notify` 方法,便于在组件内调用。 +通过 `app.use` 全局注册 Notify 组件后,会自动在 app 的所有子组件上挂载 `$notify` 方法,便于在组件内调用。 ```js export default { @@ -89,6 +89,8 @@ export default { }; ``` +> Tips: 由于 setup 选项中无法访问 this,因此不能使用上述方式,请通过 import 引入。 + ### 组件调用 如果需要在 Notify 内嵌入组件或其他自定义内容,可以使用组件调用的方式。 diff --git a/src/toast/README.zh-CN.md b/src/toast/README.zh-CN.md index 3076c174d..72e1cefc5 100644 --- a/src/toast/README.zh-CN.md +++ b/src/toast/README.zh-CN.md @@ -107,7 +107,7 @@ const timer = setInterval(() => { ### 全局方法 -通过 `app.use` 注册 Toast 组件后,会自动在 app 的所有子组件上挂载 `$toast` 方法,便于在组件内调用。 +通过 `app.use` 全局注册 Toast 组件后,会自动在 app 的所有子组件上挂载 `$toast` 方法,便于在组件内调用。 ```js export default { @@ -117,6 +117,8 @@ export default { }; ``` +> Tips: 由于 setup 选项中无法访问 this,因此不能使用上述方式,请通过 import 引入。 + ### 单例模式 Toast 默认采用单例模式,即同一时间只会存在一个 Toast,如果需要在同一时间弹出多个 Toast,可以参考下面的示例: