mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
docs: update global method guide
This commit is contained in:
@@ -43,7 +43,7 @@ Notify({
|
||||
|
||||
### Global Method
|
||||
|
||||
After import the Notify component, the `$notify` method is automatically mounted on Vue.prototype, making it easy to call within a vue component.
|
||||
After registering the Notify component through `app.use`, the `$notify` method will be automatically mounted on all subcomponents of the app.
|
||||
|
||||
```js
|
||||
export default {
|
||||
|
@@ -78,7 +78,7 @@ Notify({
|
||||
|
||||
### 全局方法
|
||||
|
||||
引入 Notify 组件后,会自动在 Vue 的 prototype 上挂载 `$notify` 方法,便于在组件内调用。
|
||||
通过 `app.use` 注册 Notify 组件后,会自动在 app 的所有子组件上挂载 `$notify` 方法,便于在组件内调用。
|
||||
|
||||
```js
|
||||
export default {
|
||||
|
Reference in New Issue
Block a user