docs: update global method guide
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@ const timer = setInterval(() => {
|
||||
|
||||
### Global Method
|
||||
|
||||
After import the Toast component, the `$toast` method is automatically mounted on Vue.prototype, making it easy to call within a vue component.
|
||||
After registering the Toast component through `app.use`, the `$toast` method will be automatically mounted on all subcomponents of the app.
|
||||
|
||||
```js
|
||||
export default {
|
||||
|
||||
@@ -90,7 +90,7 @@ const timer = setInterval(() => {
|
||||
|
||||
### 全局方法
|
||||
|
||||
引入 Toast 组件后,会自动在 Vue 的 prototype 上挂载 `$toast` 方法,便于在组件内调用。
|
||||
通过 `app.use` 注册 Toast 组件后,会自动在 app 的所有子组件上挂载 `$toast` 方法,便于在组件内调用。
|
||||
|
||||
```js
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user