docs: add import when using Toast or Notify

This commit is contained in:
陈嘉涵
2020-01-18 08:25:24 +08:00
parent 78e4c153b1
commit 9bcfddc958
68 changed files with 206 additions and 149 deletions
+3 -2
View File
@@ -18,16 +18,17 @@ Vue.use(Slider);
```
```js
import { Toast } from 'vant';
export default {
data() {
return {
value: 50
};
},
methods: {
onChange(value) {
this.$toast('Current value' + value);
Toast('Current value' + value);
}
}
};
+3 -2
View File
@@ -18,16 +18,17 @@ Vue.use(Slider);
```
```js
import { Toast } from 'vant';
export default {
data() {
return {
value: 50
};
},
methods: {
onChange(value) {
this.$toast('当前值:' + value);
Toast('当前值:' + value);
}
}
};