[Improment] add $toast/$dialog to Vue.prototype (#363)
This commit is contained in:
@@ -51,6 +51,18 @@ const timer = setInterval(() => {
|
||||
}, 1000);
|
||||
```
|
||||
|
||||
#### 组件内调用
|
||||
引入 Toast 组件后,会自动在 Vue 的 prototype 上挂载 $toast 方法,便于在组件内调用。
|
||||
|
||||
```js
|
||||
export default {
|
||||
mounted() {
|
||||
this.$toast('提示文案');
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 方法
|
||||
|
||||
|
||||
Reference in New Issue
Block a user