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 -3
View File
@@ -13,7 +13,7 @@ Vue.use(ImagePreview);
### Basic Usage
```javascript
```js
ImagePreview([
'https://img.yzcdn.cn/vant/apple-1.jpg',
'https://img.yzcdn.cn/vant/apple-2.jpg'
@@ -22,7 +22,7 @@ ImagePreview([
### Custom config
```javascript
```js
ImagePreview({
images: [
'https://img.yzcdn.cn/vant/apple-1.jpg',
@@ -37,7 +37,7 @@ ImagePreview({
### Async Close
```javascript
```js
const instance = ImagePreview({
images: [
'https://img.yzcdn.cn/vant/apple-1.jpg',
+3 -3
View File
@@ -17,7 +17,7 @@ Vue.use(ImagePreview);
直接传入图片数组,即可展示图片预览
```javascript
```js
ImagePreview([
'https://img.yzcdn.cn/1.jpg',
'https://img.yzcdn.cn/2.jpg'
@@ -28,7 +28,7 @@ ImagePreview([
通过传入配置对象,可以指定初始图片的位置、监听关闭事件
```javascript
```js
ImagePreview({
images: [
'https://img.yzcdn.cn/1.jpg',
@@ -45,7 +45,7 @@ ImagePreview({
通过`asyncClose`属性可以开启异步关闭,开启后异步关闭后,只能通过实例上的 close 方法关闭图片预览
```javascript
```js
const instance = ImagePreview({
images: [
'https://img.yzcdn.cn/1.jpg',