买家下单
商家接单
买家提货
@@ -78,22 +74,22 @@ export default {
### Steps Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| active | 当前步骤 | *number \| string* | `0` |
-| direction | 显示方向,可选值为 `vertical` | *string* | `horizontal` |
-| active-color | 激活状态颜色 | *string* | `#07c160` |
-| active-icon | 激活状态底部图标,可选值见 [Icon 组件](#/zh-CN/icon) | *string* | `checked` |
-| inactive-icon | 未激活状态底部图标,可选值见 [Icon 组件](#/zh-CN/icon) | *string* | - |
+| --- | --- | --- | --- |
+| active | 当前步骤 | _number \| string_ | `0` |
+| direction | 显示方向,可选值为 `vertical` | _string_ | `horizontal` |
+| active-color | 激活状态颜色 | _string_ | `#07c160` |
+| active-icon | 激活状态底部图标,可选值见 [Icon 组件](#/zh-CN/icon) | _string_ | `checked` |
+| inactive-icon | 未激活状态底部图标,可选值见 [Icon 组件](#/zh-CN/icon) | _string_ | - |
### Step Slots
-| 名称 | 说明 |
-|------|------|
-| active-icon | 自定义激活状态图标 |
+| 名称 | 说明 |
+| ------------- | -------------------- |
+| active-icon | 自定义激活状态图标 |
| inactive-icon | 自定义未激活状态图标 |
### Steps Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
-| click-step `v2.5.9` | 点击步骤的标题或图标时触发 | *index: number* |
+| 事件名 | 说明 | 回调参数 |
+| ------------------- | -------------------------- | --------------- |
+| click-step `v2.5.9` | 点击步骤的标题或图标时触发 | _index: number_ |
diff --git a/src/sticky/README.md b/src/sticky/README.md
index 2820ddfca..c7896501e 100644
--- a/src/sticky/README.md
+++ b/src/sticky/README.md
@@ -41,12 +41,12 @@ Vue.use(Sticky);
export default {
data() {
return {
- container: null
+ container: null,
};
},
mounted() {
this.container = this.$refs.container;
- }
+ },
};
```
@@ -54,14 +54,14 @@ export default {
### Props
-| Attribute | Description | Type | Default |
-|------|------|------|------|
-| offset-top | Offset top | *number \| string* | `0` |
-| z-index | z-index when sticky | *number \| string* | `99` |
-| container | Container DOM | *Element* | - |
+| Attribute | Description | Type | Default |
+| ---------- | ------------------- | ------------------ | ------- |
+| offset-top | Offset top | _number \| string_ | `0` |
+| z-index | z-index when sticky | _number \| string_ | `99` |
+| container | Container DOM | _Element_ | - |
### Events
-| Event | Description | Arguments |
-|------|------|------|
+| Event | Description | Arguments |
+| ------ | --------------------- | ------------------------------ |
| scroll | Triggered when scroll | object: { scrollTop, isFixed } |
diff --git a/src/sticky/README.zh-CN.md b/src/sticky/README.zh-CN.md
index 4f61d913a..52f6b44e1 100644
--- a/src/sticky/README.zh-CN.md
+++ b/src/sticky/README.zh-CN.md
@@ -51,12 +51,12 @@ Vue.use(Sticky);
export default {
data() {
return {
- container: null
+ container: null,
};
},
mounted() {
this.container = this.$refs.container;
- }
+ },
};
```
@@ -64,14 +64,14 @@ export default {
### Props
-| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| offset-top | 吸顶时与顶部的距离,单位`px` | *number \| string* | `0` |
-| z-index | 吸顶时的 z-index | *number \| string* | `99` |
-| container | 容器对应的 HTML 节点 | *Element* | - |
+| 参数 | 说明 | 类型 | 默认值 |
+| ---------- | ---------------------------- | ------------------ | ------ |
+| offset-top | 吸顶时与顶部的距离,单位`px` | _number \| string_ | `0` |
+| z-index | 吸顶时的 z-index | _number \| string_ | `99` |
+| container | 容器对应的 HTML 节点 | _Element_ | - |
### Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
+| 事件名 | 说明 | 回调参数 |
+| ------ | ---------- | ---------------------------------------------- |
| scroll | 滚动时触发 | { scrollTop: 距离顶部位置, isFixed: 是否吸顶 } |
diff --git a/src/style/README.md b/src/style/README.md
index 9907d81e4..6bb0ca1b4 100644
--- a/src/style/README.md
+++ b/src/style/README.md
@@ -10,15 +10,18 @@ When the text content length exceeds the maximum container width, the excess tex
```html
- This is a paragraph that displays up to one line of text, and the rest of the text will be omitted.
+ This is a paragraph that displays up to one line of text, and the rest of the
+ text will be omitted.
- This is a paragraph that displays up to two lines of text, and the rest of the text will be omitted.
+ This is a paragraph that displays up to two lines of text, and the rest of the
+ text will be omitted.
- This is a paragraph that displays up to three lines of text, and the rest of the text will be omitted.
+ This is a paragraph that displays up to three lines of text, and the rest of
+ the text will be omitted.
```
diff --git a/src/style/README.zh-CN.md b/src/style/README.zh-CN.md
index 53597c2c3..cc42831cd 100644
--- a/src/style/README.zh-CN.md
+++ b/src/style/README.zh-CN.md
@@ -13,10 +13,14 @@ Vant 中默认包含了一些常用样式,可以直接通过 className 的方
这是一段最多显示一行的文字,多余的内容会被省略
-这是一段最多显示两行的文字,多余的内容会被省略
+
+ 这是一段最多显示两行的文字,多余的内容会被省略
+
-这是一段最多显示三行的文字,多余的内容会被省略
+
+ 这是一段最多显示三行的文字,多余的内容会被省略
+
```
### 1px 边框
diff --git a/src/submit-bar/README.md b/src/submit-bar/README.md
index f7ef3de06..2d8d0eaa9 100644
--- a/src/submit-bar/README.md
+++ b/src/submit-bar/README.md
@@ -14,11 +14,7 @@ Vue.use(SubmitBar);
### Basic Usage
```html
-
+
```
### Disabled
@@ -41,12 +37,7 @@ Vue.use(SubmitBar);
`submit` event will not triggerd when loading.
```html
-
+
```
### Advanced Usage
@@ -54,11 +45,7 @@ Vue.use(SubmitBar);
Use slot to add custom contents.
```html
-
+
Check
Some tips, Link
@@ -71,31 +58,31 @@ Use slot to add custom contents.
### Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| price | Price | *number* | - |
-| label | Price left label | *string* | `Total:` |
-| suffix-label | Price right label | *string* | - |
-| text-align `v2.3.0` | Price label text align can be set to `left` | *string* | `right` |
-| button-text | Button text | *string* | - |
-| button-type | Button type | *string* | `danger` |
-| tip | Tip | *string* | - |
-| tip-icon | Icon | *string* | - |
-| currency | Currency symbol | *string* | `¥` |
-| decimal-length | number of digits to appear after the decimal point | *number \| string* | `2` |
-| disabled | Whether to disable button | *boolean* | `false` |
-| loading | Whether to show loading icon | *boolean* | `false` |
-| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `true` |
+| --- | --- | --- | --- |
+| price | Price | _number_ | - |
+| label | Price left label | _string_ | `Total:` |
+| suffix-label | Price right label | _string_ | - |
+| text-align `v2.3.0` | Price label text align can be set to `left` | _string_ | `right` |
+| button-text | Button text | _string_ | - |
+| button-type | Button type | _string_ | `danger` |
+| tip | Tip | _string_ | - |
+| tip-icon | Icon | _string_ | - |
+| currency | Currency symbol | _string_ | `¥` |
+| decimal-length | number of digits to appear after the decimal point | _number \| string_ | `2` |
+| disabled | Whether to disable button | _boolean_ | `false` |
+| loading | Whether to show loading icon | _boolean_ | `false` |
+| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
### Events
-| Event | Description | Arguments |
-|------|------|------|
-| submit | Triggerd when click submit button | - |
+| Event | Description | Arguments |
+| ------ | --------------------------------- | --------- |
+| submit | Triggerd when click submit button | - |
### Slots
-| Name | Description |
-|------|------|
+| Name | Description |
+| ------- | ------------------- |
| default | Custom left content |
-| top | Custom top content |
-| tip | Custom tips |
+| top | Custom top content |
+| tip | Custom tips |
diff --git a/src/submit-bar/README.zh-CN.md b/src/submit-bar/README.zh-CN.md
index 6af5701ae..b13eb130a 100644
--- a/src/submit-bar/README.zh-CN.md
+++ b/src/submit-bar/README.zh-CN.md
@@ -14,11 +14,7 @@ Vue.use(SubmitBar);
### 基础用法
```html
-
+
```
### 禁用状态
@@ -54,11 +50,7 @@ Vue.use(SubmitBar);
通过插槽插入自定义内容
```html
-
+
全选
你的收货地址不支持同城送, 修改地址
@@ -71,31 +63,31 @@ Vue.use(SubmitBar);
### Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| price | 价格(单位分) | *number* | - |
-| label | 价格左侧文案 | *string* | `合计:` |
-| suffix-label | 价格右侧文案 | *string* | - |
-| text-align `v2.3.0` | 价格文案对齐方向,可选值为 `left` | *string* | `right` |
-| button-text | 按钮文字 | *string* | - |
-| button-type | 按钮类型 | *string* | `danger` |
-| tip | 提示文案 | *string* | - |
-| tip-icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | *string* | - |
-| currency | 货币符号 | *string* | `¥` |
-| decimal-length | 价格小数点后位数 | *number \| string* | `2` |
-| disabled | 是否禁用按钮 | *boolean* | `false` |
-| loading | 是否显示加载中的按钮 | *boolean* | `false` |
-| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `true` |
+| --- | --- | --- | --- |
+| price | 价格(单位分) | _number_ | - |
+| label | 价格左侧文案 | _string_ | `合计:` |
+| suffix-label | 价格右侧文案 | _string_ | - |
+| text-align `v2.3.0` | 价格文案对齐方向,可选值为 `left` | _string_ | `right` |
+| button-text | 按钮文字 | _string_ | - |
+| button-type | 按钮类型 | _string_ | `danger` |
+| tip | 提示文案 | _string_ | - |
+| tip-icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
+| currency | 货币符号 | _string_ | `¥` |
+| decimal-length | 价格小数点后位数 | _number \| string_ | `2` |
+| disabled | 是否禁用按钮 | _boolean_ | `false` |
+| loading | 是否显示加载中的按钮 | _boolean_ | `false` |
+| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | _boolean_ | `true` |
### Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
-| submit | 按钮点击事件回调 | - |
+| 事件名 | 说明 | 回调参数 |
+| ------ | ---------------- | -------- |
+| submit | 按钮点击事件回调 | - |
### Slots
-| 名称 | 说明 |
-|------|------|
-| default | 自定义订单栏左侧内容 |
-| top | 自定义订单栏上方内容 |
-| tip | 提示文案中的额外操作和说明 |
+| 名称 | 说明 |
+| ------- | -------------------------- |
+| default | 自定义订单栏左侧内容 |
+| top | 自定义订单栏上方内容 |
+| tip | 提示文案中的额外操作和说明 |
diff --git a/src/swipe-cell/README.md b/src/swipe-cell/README.md
index a99e9ae70..25a979899 100644
--- a/src/swipe-cell/README.md
+++ b/src/swipe-cell/README.md
@@ -21,7 +21,7 @@ Vue.use(SwipeCell);
-
+
```
@@ -39,24 +39,19 @@ Vue.use(SwipeCell);
thumb="https://img.yzcdn.cn/vant/cat.jpeg"
/>
-
+
```
@@ -86,15 +81,15 @@ export default {
break;
case 'right':
Dialog.confirm({
- message: 'Are you sure to delete?'
+ message: 'Are you sure to delete?',
}).then(() => {
instance.close();
});
break;
}
- }
- }
-}
+ },
+ },
+};
```
## API
@@ -102,43 +97,43 @@ export default {
### Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| name `v2.0.4` | Identifier of SwipeCell | *number \| string* | - |
-| left-width | Width of the left swipe area | *number \| string* | `auto` |
-| right-width | Width of the right swipe area | *number \| string* | `auto` |
-| before-close `v2.3.0` | Callback function before close | *Function* | - |
-| disabled | Whether to disabled swipe | *boolean* | `false` |
-| stop-propagation `v2.1.0` | Whether to stop touchmove event propagation | *boolean* | `false` |
+| --- | --- | --- | --- |
+| name `v2.0.4` | Identifier of SwipeCell | _number \| string_ | - |
+| left-width | Width of the left swipe area | _number \| string_ | `auto` |
+| right-width | Width of the right swipe area | _number \| string_ | `auto` |
+| before-close `v2.3.0` | Callback function before close | _Function_ | - |
+| disabled | Whether to disabled swipe | _boolean_ | `false` |
+| stop-propagation `v2.1.0` | Whether to stop touchmove event propagation | _boolean_ | `false` |
### Slots
-| Name | Description |
-|------|------|
-| default | custom content |
-| left | content of left scrollable area |
-| right | content of right scrollabe area |
+| Name | Description |
+| ------- | ------------------------------- |
+| default | custom content |
+| left | content of left scrollable area |
+| right | content of right scrollabe area |
### Events
| Event | Description | Arguments |
-|------|------|------|
+| --- | --- | --- |
| click | Triggered when clicked | Click positon (`left` `right` `cell` `outside`) |
| open | Triggered when opened | { position: 'left' \| 'right' , name: string } |
| close | Triggered when closed | { position: string , name: string } |
### beforeClose Params
-| Attribute | Description | Type |
-|------|------|------|
-| name | Name | *string* |
-| position | Click positon (`left` `right` `cell` `outside`) | *string* |
-| instance | SwipeCell instance | *SwipeCell* |
+| Attribute | Description | Type |
+| --------- | ----------------------------------------------- | ----------- |
+| name | Name | _string_ |
+| position | Click positon (`left` `right` `cell` `outside`) | _string_ |
+| instance | SwipeCell instance | _SwipeCell_ |
### Methods
Use [ref](https://vuejs.org/v2/api/#ref) to get SwipeCell instance and call instance methods
-| Name | Description | Attribute | Return value |
-|------|------|------|------|
-| open | open SwipeCell | position: `left | right` | - |
-| close | close SwipeCell | - | - |
+| Name | Description | Attribute | Return value |
+| ----- | --------------- | ------------------------ | ------------ |
+| open | open SwipeCell | position: `left | right` | - |
+| close | close SwipeCell | - | - |
diff --git a/src/swipe-cell/README.zh-CN.md b/src/swipe-cell/README.zh-CN.md
index ae08f3686..ccaf901ec 100644
--- a/src/swipe-cell/README.zh-CN.md
+++ b/src/swipe-cell/README.zh-CN.md
@@ -23,7 +23,7 @@ Vue.use(SwipeCell);
-
+
```
@@ -43,24 +43,19 @@ Vue.use(SwipeCell);
thumb="https://img.yzcdn.cn/vant/cat.jpeg"
/>
-
+
```
@@ -94,15 +89,15 @@ export default {
break;
case 'right':
Dialog.confirm({
- message: '确定删除吗?'
+ message: '确定删除吗?',
}).then(() => {
instance.close();
});
break;
}
- }
- }
-}
+ },
+ },
+};
```
## API
@@ -110,48 +105,48 @@ export default {
### Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| name `v2.0.4` | 标识符,可以在事件参数中获取到 | *number \| string* | - |
-| left-width | 指定左侧滑动区域宽度,单位为`px` | *number \| string* | `auto` |
-| right-width | 指定右侧滑动区域宽度,单位为`px` | *number \| string* | `auto` |
-| before-close `v2.3.0` | 关闭前的回调函数 | *Function* | - |
-| disabled | 是否禁用滑动 | *boolean* | `false` |
-| stop-propagation `v2.1.0` | 是否阻止滑动事件冒泡 | *boolean* | `false` |
+| --- | --- | --- | --- |
+| name `v2.0.4` | 标识符,可以在事件参数中获取到 | _number \| string_ | - |
+| left-width | 指定左侧滑动区域宽度,单位为`px` | _number \| string_ | `auto` |
+| right-width | 指定右侧滑动区域宽度,单位为`px` | _number \| string_ | `auto` |
+| before-close `v2.3.0` | 关闭前的回调函数 | _Function_ | - |
+| disabled | 是否禁用滑动 | _boolean_ | `false` |
+| stop-propagation `v2.1.0` | 是否阻止滑动事件冒泡 | _boolean_ | `false` |
### Slots
-| 名称 | 说明 |
-|------|------|
+| 名称 | 说明 |
+| ------- | -------------- |
| default | 自定义显示内容 |
-| left | 左侧滑动内容 |
-| right | 右侧滑动内容 |
+| left | 左侧滑动内容 |
+| right | 右侧滑动内容 |
### Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
-| click | 点击时触发 | 关闭时的点击位置 (`left` `right` `cell` `outside`) |
-| open | 打开时触发 | { position: 'left' \| 'right' , name: string } |
-| close | 关闭时触发 | { position: string , name: string } |
+| 事件名 | 说明 | 回调参数 |
+| ------ | ---------- | -------------------------------------------------- |
+| click | 点击时触发 | 关闭时的点击位置 (`left` `right` `cell` `outside`) |
+| open | 打开时触发 | { position: 'left' \| 'right' , name: string } |
+| close | 关闭时触发 | { position: string , name: string } |
### beforeClose 参数
beforeClose 的第一个参数为对象,对象中包含以下属性:
-| 参数名 | 说明 | 类型 |
-|------|------|------|
-| name | 标识符 | *string* |
-| position | 关闭时的点击位置 (`left` `right` `cell` `outside`) | *string* |
-| instance | SwipeCell 实例,用于调用实例方法 | *SwipeCell* |
+| 参数名 | 说明 | 类型 |
+| -------- | -------------------------------------------------- | ----------- |
+| name | 标识符 | _string_ |
+| position | 关闭时的点击位置 (`left` `right` `cell` `outside`) | _string_ |
+| instance | SwipeCell 实例,用于调用实例方法 | _SwipeCell_ |
### 方法
通过 ref 可以获取到 SwipeCell 实例并调用实例方法,详见[组件实例方法](#/zh-CN/quickstart#zu-jian-shi-li-fang-fa)
-| 方法名 | 说明 | 参数 | 返回值 |
-|------|------|------|------|
-| open | 打开单元格侧边栏 | position: `left | right` | - |
-| close | 收起单元格侧边栏 | - | - |
+| 方法名 | 说明 | 参数 | 返回值 |
+| ------ | ---------------- | ------------------------ | ------ |
+| open | 打开单元格侧边栏 | position: `left | right` | - |
+| close | 收起单元格侧边栏 | - | - |
## 常见问题
diff --git a/src/swipe/README.md b/src/swipe/README.md
index ab99f81f5..a8362aeea 100644
--- a/src/swipe/README.md
+++ b/src/swipe/README.md
@@ -25,13 +25,13 @@ Use `autoplay` prop to set autoplay interval
```
@@ -58,11 +58,11 @@ export default {
return {
images: [
'https://img.yzcdn.cn/vant/apple-1.jpg',
- 'https://img.yzcdn.cn/vant/apple-2.jpg'
- ]
- }
- }
-}
+ 'https://img.yzcdn.cn/vant/apple-2.jpg',
+ ],
+ };
+ },
+};
```
### Change Event
@@ -83,9 +83,9 @@ export default {
methods: {
onChange(index) {
Toast('Current Swipe index:' + index);
- }
- }
-}
+ },
+ },
+};
```
### Vertical Scrolling
@@ -128,14 +128,14 @@ export default {
```
@@ -143,15 +143,15 @@ export default {
export default {
data() {
return {
- current: 0
- }
+ current: 0,
+ };
},
methods: {
onChange(index) {
this.current = index;
- }
- }
-}
+ },
+ },
+};
```
## API
@@ -159,38 +159,38 @@ export default {
### Swipe Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| autoplay | Autoplay interval (ms) | *number \| string* | - |
-| duration | Animation duration (ms) | *number \| string* | `500` |
-| initial-swipe | Index of initial swipe, start from 0 | *number \| string* | `0` |
-| width | Set Swiper Item Width | *number \| string* | `0` |
-| height | Set Swiper Item Height | *number \| string* | `0` |
-| loop | Whether to enable loop | *boolean* | `true` |
-| show-indicators | Whether to show indicators | *boolean* | `true` |
-| vertical | Whether to be vertical Scrolling | *boolean* | `false` |
-| touchable | Whether to allow swipe by touch gesture | *boolean* | `true` |
-| stop-propagation `v2.1.0` | Whether to stop touchmove event propagation | *boolean* | `false` |
-| lazy-render `v2.5.8` | Whether to enable lazy render | *boolean* | `false` |
-| indicator-color | Indicator color | *string* | `#1989fa` |
+| --- | --- | --- | --- |
+| autoplay | Autoplay interval (ms) | _number \| string_ | - |
+| duration | Animation duration (ms) | _number \| string_ | `500` |
+| initial-swipe | Index of initial swipe, start from 0 | _number \| string_ | `0` |
+| width | Set Swiper Item Width | _number \| string_ | `0` |
+| height | Set Swiper Item Height | _number \| string_ | `0` |
+| loop | Whether to enable loop | _boolean_ | `true` |
+| show-indicators | Whether to show indicators | _boolean_ | `true` |
+| vertical | Whether to be vertical Scrolling | _boolean_ | `false` |
+| touchable | Whether to allow swipe by touch gesture | _boolean_ | `true` |
+| stop-propagation `v2.1.0` | Whether to stop touchmove event propagation | _boolean_ | `false` |
+| lazy-render `v2.5.8` | Whether to enable lazy render | _boolean_ | `false` |
+| indicator-color | Indicator color | _string_ | `#1989fa` |
### Swipe Events
-| Event | Description | Arguments |
-|------|------|------|
+| Event | Description | Arguments |
+| ------ | ----------------------------------- | ----------------------------- |
| change | Triggered when current swipe change | index: index of current swipe |
### SwipeItem Events
-| Event | Description | Arguments |
-|------|------|------|
-| click | Triggered when clicked | *event: Event* |
+| Event | Description | Arguments |
+| ----- | ---------------------- | -------------- |
+| click | Triggered when clicked | _event: Event_ |
### Swipe Methods
Use [ref](https://vuejs.org/v2/api/#ref) to get Swipe instance and call instance methods
| Name | Description | Attribute | Return value |
-|------|------|------|------|
+| --- | --- | --- | --- |
| prev `v2.4.2` | Swipe to prev item | - | - |
| next `v2.4.2` | Swipe to next item | - | - |
| swipeTo | Swipe to target index | index: target index, options: Options | void |
@@ -198,13 +198,13 @@ Use [ref](https://vuejs.org/v2/api/#ref) to get Swipe instance and call instance
### swipeTo Options
-| Name | Description | Type |
-|------|------|------|------|
-| immediate | Whether to skip animation | *boolean* |
+| Name | Description | Type |
+| --------- | ------------------------- | --------- |
+| immediate | Whether to skip animation | _boolean_ |
### Swipe Slots
-| Name | Description |
-|------|------|
-| default | Content |
+| Name | Description |
+| --------- | ---------------- |
+| default | Content |
| indicator | Custom indicator |
diff --git a/src/swipe/README.zh-CN.md b/src/swipe/README.zh-CN.md
index fcc3f380a..ed6a9f29e 100644
--- a/src/swipe/README.zh-CN.md
+++ b/src/swipe/README.zh-CN.md
@@ -25,13 +25,13 @@ Vue.use(SwipeItem);
```
@@ -58,11 +58,11 @@ export default {
return {
images: [
'https://img.yzcdn.cn/vant/apple-1.jpg',
- 'https://img.yzcdn.cn/vant/apple-2.jpg'
- ]
- }
- }
-}
+ 'https://img.yzcdn.cn/vant/apple-2.jpg',
+ ],
+ };
+ },
+};
```
### 监听 change 事件
@@ -83,9 +83,9 @@ export default {
methods: {
onChange(index) {
Toast('当前 Swipe 索引:' + index);
- }
- }
-}
+ },
+ },
+};
```
### 纵向滚动
@@ -134,14 +134,14 @@ export default {
```
@@ -149,15 +149,15 @@ export default {
export default {
data() {
return {
- current: 0
- }
+ current: 0,
+ };
},
methods: {
onChange(index) {
this.current = index;
- }
- }
-}
+ },
+ },
+};
```
## API
@@ -165,38 +165,38 @@ export default {
### Swipe Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| autoplay | 自动轮播间隔,单位为 ms | *number \| string* | - |
-| duration | 动画时长,单位为 ms | *number \| string* | `500` |
-| initial-swipe | 初始位置索引值 | *number \| string* | `0` |
-| width | 滑块宽度,单位为`px` | *number \| string* | `auto` |
-| height | 滑块高度,单位为`px` | *number \| string* | `auto` |
-| loop | 是否开启循环播放 | *boolean* | `true` |
-| show-indicators | 是否显示指示器 | *boolean* | `true` |
-| vertical | 是否为纵向滚动 | *boolean* | `false` |
-| touchable | 是否可以通过手势滑动 | *boolean* | `true` |
-| stop-propagation `v2.2.13` | 是否阻止滑动事件冒泡 | *boolean* | `true` |
-| lazy-render `v2.5.8` | 是否延迟渲染未展示的轮播 | *boolean* | `false` |
-| indicator-color | 指示器颜色 | *string* | `#1989fa` |
+| --- | --- | --- | --- |
+| autoplay | 自动轮播间隔,单位为 ms | _number \| string_ | - |
+| duration | 动画时长,单位为 ms | _number \| string_ | `500` |
+| initial-swipe | 初始位置索引值 | _number \| string_ | `0` |
+| width | 滑块宽度,单位为`px` | _number \| string_ | `auto` |
+| height | 滑块高度,单位为`px` | _number \| string_ | `auto` |
+| loop | 是否开启循环播放 | _boolean_ | `true` |
+| show-indicators | 是否显示指示器 | _boolean_ | `true` |
+| vertical | 是否为纵向滚动 | _boolean_ | `false` |
+| touchable | 是否可以通过手势滑动 | _boolean_ | `true` |
+| stop-propagation `v2.2.13` | 是否阻止滑动事件冒泡 | _boolean_ | `true` |
+| lazy-render `v2.5.8` | 是否延迟渲染未展示的轮播 | _boolean_ | `false` |
+| indicator-color | 指示器颜色 | _string_ | `#1989fa` |
### Swipe Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
+| 事件名 | 说明 | 回调参数 |
+| ------ | -------------------- | ------------------- |
| change | 每一页轮播结束后触发 | index, 当前页的索引 |
### SwipeItem Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
-| click | 点击时触发 | *event: Event* |
+| 事件名 | 说明 | 回调参数 |
+| ------ | ---------- | -------------- |
+| click | 点击时触发 | _event: Event_ |
### Swipe 方法
通过 ref 可以获取到 Swipe 实例并调用实例方法,详见[组件实例方法](#/zh-CN/quickstart#zu-jian-shi-li-fang-fa)
| 方法名 | 说明 | 参数 | 返回值 |
-|------|------|------|------|
+| --- | --- | --- | --- |
| prev `v2.4.2` | 切换到上一轮播 | - | - |
| next `v2.4.2` | 切换到下一轮播 | - | - |
| swipeTo | 切换到指定位置 | index: number, options: Options | void |
@@ -204,15 +204,15 @@ export default {
### swipeTo Options 格式
-| 名称 | 说明 | 类型 |
-|------|------|------|
-| immediate | 是否跳过动画 | *boolean* |
+| 名称 | 说明 | 类型 |
+| --------- | ------------ | --------- |
+| immediate | 是否跳过动画 | _boolean_ |
### Swipe Slots
-| 名称 | 说明 |
-|------|------|
-| default | 轮播内容 |
+| 名称 | 说明 |
+| --------- | ------------ |
+| default | 轮播内容 |
| indicator | 自定义指示器 |
## 常见问题
diff --git a/src/switch-cell/README.md b/src/switch-cell/README.md
index 571480a4a..beb73c775 100644
--- a/src/switch-cell/README.md
+++ b/src/switch-cell/README.md
@@ -27,10 +27,10 @@ Vue.use(SwitchCell);
export default {
data() {
return {
- checked: true
- }
- }
-}
+ checked: true,
+ };
+ },
+};
```
### Disabled
@@ -58,21 +58,21 @@ use `loading` property to keep component in loading state
### Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| v-model | on-off state of the switch | *any* | `false` |
-| title | the left side title | *string* | `''` |
-| border | whether to show cell border | *boolean* | `true` |
-| cell-size | Cell size,can be set to `large` | *string* | - |
-| loading | whether switch is loading | *boolean* | `false` |
-| disabled | whether to disable switch | *boolean* | `false` |
-| size | Size of switch | *number \| string* | `24px` |
-| active-color | Background of switch color when active | *string* | `#1989fa` |
-| inactive-color | Background of switch color when inactive | *string* | `white` |
-| active-value | Value when active | *any* | `true` |
-| inactive-value | Value when inactive | *any* | `false` |
+| --- | --- | --- | --- |
+| v-model | on-off state of the switch | _any_ | `false` |
+| title | the left side title | _string_ | `''` |
+| border | whether to show cell border | _boolean_ | `true` |
+| cell-size | Cell size,can be set to `large` | _string_ | - |
+| loading | whether switch is loading | _boolean_ | `false` |
+| disabled | whether to disable switch | _boolean_ | `false` |
+| size | Size of switch | _number \| string_ | `24px` |
+| active-color | Background of switch color when active | _string_ | `#1989fa` |
+| inactive-color | Background of switch color when inactive | _string_ | `white` |
+| active-value | Value when active | _any_ | `true` |
+| inactive-value | Value when inactive | _any_ | `false` |
### Events
| Event | Description | Arguments |
-|------|------|------|
+| --- | --- | --- |
| change | triggered when the on-off state is changed | checked: switch is on or not |
diff --git a/src/switch-cell/README.zh-CN.md b/src/switch-cell/README.zh-CN.md
index 118615315..31175dd98 100644
--- a/src/switch-cell/README.zh-CN.md
+++ b/src/switch-cell/README.zh-CN.md
@@ -27,10 +27,10 @@ Vue.use(SwitchCell);
export default {
data() {
return {
- checked: true
- }
- }
-}
+ checked: true,
+ };
+ },
+};
```
### 禁用状态
@@ -58,21 +58,21 @@ export default {
### Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| v-model | 开关状态 | *any* | `false` |
-| title | 左侧标题 | *string* | `''` |
-| border | 是否展示单元格内边框 | *boolean* | `true` |
-| cell-size | 单元格大小,可选值为 `large` | *string* | - |
-| loading | 是否为加载状态 | *boolean* | `false` |
-| disabled | 是否为禁用状态 | *boolean* | `false` |
-| size | 开关尺寸 | *number \| string* | `24px` |
-| active-color | 开关时的背景色 | *string* | `#1989fa` |
-| inactive-color | 开关时的背景色 | *string* | `white` |
-| active-value | 打开时的值 | *any* | `true` |
-| inactive-value | 关闭时的值 | *any* | `false` |
+| --- | --- | --- | --- |
+| v-model | 开关状态 | _any_ | `false` |
+| title | 左侧标题 | _string_ | `''` |
+| border | 是否展示单元格内边框 | _boolean_ | `true` |
+| cell-size | 单元格大小,可选值为 `large` | _string_ | - |
+| loading | 是否为加载状态 | _boolean_ | `false` |
+| disabled | 是否为禁用状态 | _boolean_ | `false` |
+| size | 开关尺寸 | _number \| string_ | `24px` |
+| active-color | 开关时的背景色 | _string_ | `#1989fa` |
+| inactive-color | 开关时的背景色 | _string_ | `white` |
+| active-value | 打开时的值 | _any_ | `true` |
+| inactive-value | 关闭时的值 | _any_ | `false` |
### Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
+| 事件名 | 说明 | 回调参数 |
+| ------ | ---------------- | --------------------- |
| change | 开关状态切换回调 | checked: 是否选中开关 |
diff --git a/src/switch/README.md b/src/switch/README.md
index c78ccdcd9..7c88719c0 100644
--- a/src/switch/README.md
+++ b/src/switch/README.md
@@ -21,10 +21,10 @@ Vue.use(Switch);
export default {
data() {
return {
- checked: true
+ checked: true,
};
- }
-};
+ },
+};
```
### Disabled
@@ -61,20 +61,20 @@ export default {
export default {
data() {
return {
- checked: true
+ checked: true,
};
},
methods: {
onInput(checked) {
Dialog.confirm({
title: 'Confirm',
- message: 'Are you sure to toggle switch?'
+ message: 'Are you sure to toggle switch?',
}).then(() => {
this.checked = checked;
});
- }
- }
-};
+ },
+ },
+};
```
### Inside a Cell
@@ -92,19 +92,19 @@ export default {
### Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| v-model | Check status of Switch | *ActiveValue \| InactiveValue* | `false` |
-| loading | Whether to show loading icon | *boolean* | `false` |
-| disabled | Whether to disable switch | *boolean* | `false` |
-| size `v2.2.11` | Size of switch | *number \| string* | `30px` |
-| active-color | Background color when active | *string* | `#1989fa` |
-| inactive-color | Background color when inactive | *string* | `white` |
-| active-value | Value when active | *any* | `true` |
-| inactive-value | Value when inactive | *any* | `false` |
+| --- | --- | --- | --- |
+| v-model | Check status of Switch | _ActiveValue \| InactiveValue_ | `false` |
+| loading | Whether to show loading icon | _boolean_ | `false` |
+| disabled | Whether to disable switch | _boolean_ | `false` |
+| size `v2.2.11` | Size of switch | _number \| string_ | `30px` |
+| active-color | Background color when active | _string_ | `#1989fa` |
+| inactive-color | Background color when inactive | _string_ | `white` |
+| active-value | Value when active | _any_ | `true` |
+| inactive-value | Value when inactive | _any_ | `false` |
### Events
-| Event | Description | Parameters |
-|------|------|------|
-| change | Triggered when check status changed | *value: any* |
-| click `v2.2.11` | Triggered when clicked | *event: Event* |
+| Event | Description | Parameters |
+| --------------- | ----------------------------------- | -------------- |
+| change | Triggered when check status changed | _value: any_ |
+| click `v2.2.11` | Triggered when clicked | _event: Event_ |
diff --git a/src/switch/README.zh-CN.md b/src/switch/README.zh-CN.md
index 10827aa83..1173a06ec 100644
--- a/src/switch/README.zh-CN.md
+++ b/src/switch/README.zh-CN.md
@@ -23,10 +23,10 @@ Vue.use(Switch);
export default {
data() {
return {
- checked: true
+ checked: true,
};
- }
-};
+ },
+};
```
### 禁用状态
@@ -73,20 +73,20 @@ export default {
export default {
data() {
return {
- checked: true
+ checked: true,
};
},
methods: {
onInput(checked) {
Dialog.confirm({
title: '提醒',
- message: '是否切换开关?'
+ message: '是否切换开关?',
}).then(() => {
this.checked = checked;
});
- }
- }
-};
+ },
+ },
+};
```
### 搭配单元格使用
@@ -103,20 +103,20 @@ export default {
### Props
-| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| v-model | 开关选中状态 | *any* | `false` |
-| loading | 是否为加载状态 | *boolean* | `false` |
-| disabled | 是否为禁用状态 | *boolean* | `false` |
-| size `v2.2.11` | 开关尺寸,默认单位为`px` | *number \| string* | `30px` |
-| active-color | 打开时的背景色 | *string* | `#1989fa` |
-| inactive-color | 关闭时的背景色 | *string* | `white` |
-| active-value | 打开时对应的值 | *any* | `true` |
-| inactive-value | 关闭时对应的值 | *any* | `false` |
+| 参数 | 说明 | 类型 | 默认值 |
+| -------------- | ------------------------ | ------------------ | --------- |
+| v-model | 开关选中状态 | _any_ | `false` |
+| loading | 是否为加载状态 | _boolean_ | `false` |
+| disabled | 是否为禁用状态 | _boolean_ | `false` |
+| size `v2.2.11` | 开关尺寸,默认单位为`px` | _number \| string_ | `30px` |
+| active-color | 打开时的背景色 | _string_ | `#1989fa` |
+| inactive-color | 关闭时的背景色 | _string_ | `white` |
+| active-value | 打开时对应的值 | _any_ | `true` |
+| inactive-value | 关闭时对应的值 | _any_ | `false` |
### Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
-| change | 开关状态切换时触发 | *value: any* |
-| click `v2.2.11` | 点击时触发 | *event: Event* |
+| 事件名 | 说明 | 回调参数 |
+| --------------- | ------------------ | -------------- |
+| change | 开关状态切换时触发 | _value: any_ |
+| click `v2.2.11` | 点击时触发 | _event: Event_ |
diff --git a/src/tab/README.md b/src/tab/README.md
index b6c730907..98e48b913 100644
--- a/src/tab/README.md
+++ b/src/tab/README.md
@@ -28,10 +28,10 @@ The first tab is actived by default, you can set `v-model` to active specified t
export default {
data() {
return {
- active: 2
+ active: 2,
};
- }
-}
+ },
+};
```
### Match By Name
@@ -48,10 +48,10 @@ export default {
export default {
data() {
return {
- activeName: 'a'
+ activeName: 'a',
};
- }
-}
+ },
+};
```
### Swipe Tabs
@@ -68,7 +68,7 @@ By default more than 4 tabs, you can scroll through the tabs. You can set `swipe
### Disabled Tab
-You can set `disabled` attribute on the corresponding `van-tab`.
+You can set `disabled` attribute on the corresponding `van-tab`.
```html
@@ -85,8 +85,8 @@ export default {
methods: {
onClickDisabled(name, title) {
Toast(title + ' is disabled');
- }
- }
+ },
+ },
};
```
@@ -119,8 +119,8 @@ export default {
methods: {
onClick(name, title) {
Toast(title);
- }
- }
+ },
+ },
};
```
@@ -143,9 +143,7 @@ Use title slot to custom tab title
```html
-
- tab
-
+ tab
content {{ index }}
@@ -192,44 +190,44 @@ In scrollspy mode, the list of content will be tiled
### Tabs Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| v-model | Index of active tab | *number \| string* | `0` |
-| type | Can be set to `line` `card` | *string* | `line` |
-| color | Tab color | *string* | `#ee0a24` |
-| background | Background color | *string* | `white` |
-| duration | Toggle tab's animation time | *number \| string* | `0.3` | - |
-| line-width | Width of tab line | *number \| string* | Width of active tab |
-| line-height | Height of tab line | *number \| string* | `3px` |
-| animated | Whether to change tabs with animation | *boolean* | `false` |
-| border | Whether to show border when `type="line"` | *boolean* | `true` |
-| ellipsis | Whether to ellipsis too long title | *boolean* | `true` |
-| sticky | Whether to use sticky mode | *boolean* | `false` |
-| swipeable | Whether to switch tabs with swipe gestrue in the content | *boolean* | `false` |
-| lazy-render | Whether to enable tab content lazy render | *boolean* | `true` |
-| scrollspy `v2.3.0` | Whether to use scrollspy mode | *boolean* | `false` |
-| offset-top | Offset top when use sticky mode | *number \| string* | `0` |
-| swipe-threshold | Set swipe tabs threshold | *number \| string* | `4` | - |
-| title-active-color | Title active color | *string* | - |
-| title-inactive-color | Title inactive color | *string* | - |
+| --- | --- | --- | --- |
+| v-model | Index of active tab | _number \| string_ | `0` |
+| type | Can be set to `line` `card` | _string_ | `line` |
+| color | Tab color | _string_ | `#ee0a24` |
+| background | Background color | _string_ | `white` |
+| duration | Toggle tab's animation time | _number \| string_ | `0.3` | - |
+| line-width | Width of tab line | _number \| string_ | Width of active tab |
+| line-height | Height of tab line | _number \| string_ | `3px` |
+| animated | Whether to change tabs with animation | _boolean_ | `false` |
+| border | Whether to show border when `type="line"` | _boolean_ | `true` |
+| ellipsis | Whether to ellipsis too long title | _boolean_ | `true` |
+| sticky | Whether to use sticky mode | _boolean_ | `false` |
+| swipeable | Whether to switch tabs with swipe gestrue in the content | _boolean_ | `false` |
+| lazy-render | Whether to enable tab content lazy render | _boolean_ | `true` |
+| scrollspy `v2.3.0` | Whether to use scrollspy mode | _boolean_ | `false` |
+| offset-top | Offset top when use sticky mode | _number \| string_ | `0` |
+| swipe-threshold | Set swipe tabs threshold | _number \| string_ | `4` | - |
+| title-active-color | Title active color | _string_ | - |
+| title-inactive-color | Title inactive color | _string_ | - |
### Tab Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| title | Title | *string* | - |
-| disabled | Whether to disable tab | *boolean* | `false` |
-| dot `v2.3.0` | Whether to show red dot on the title | *boolean* | `false` |
-| badge `v2.5.6` | Content of the badge on the title | *number \| string* | - |
-| name `v2.0.6` | Identifier | *number \| string* | Index of tab |
-| url `v2.2.1` | Link | *string* | - |
-| to `v2.2.1` | Target route of the link, same as to of vue-router | *string \| object* | - |
-| replace `v2.2.1` | If true, the navigation will not leave a history record | *boolean* | `false` |
-| title-style `v2.2.14` | Custom title style | *any* | - |
+| --- | --- | --- | --- |
+| title | Title | _string_ | - |
+| disabled | Whether to disable tab | _boolean_ | `false` |
+| dot `v2.3.0` | Whether to show red dot on the title | _boolean_ | `false` |
+| badge `v2.5.6` | Content of the badge on the title | _number \| string_ | - |
+| name `v2.0.6` | Identifier | _number \| string_ | Index of tab |
+| url `v2.2.1` | Link | _string_ | - |
+| to `v2.2.1` | Target route of the link, same as to of vue-router | _string \| object_ | - |
+| replace `v2.2.1` | If true, the navigation will not leave a history record | _boolean_ | `false` |
+| title-style `v2.2.14` | Custom title style | _any_ | - |
### Tabs Events
| Event | Description | Arguments |
-|------|------|------|
+| --- | --- | --- |
| click | Triggered when click tab | name,title |
| change | Triggered when active tab changed | name,title |
| disabled | Triggered when click disabled tab | name,title |
@@ -241,19 +239,19 @@ In scrollspy mode, the list of content will be tiled
Use [ref](https://vuejs.org/v2/api/#ref) to get Tabs instance and call instance methods
| Name | Description | Attribute | Return value |
-|------|------|------|------|
+| --- | --- | --- | --- |
| resize | Resize Tabs when container element resized | - | void |
### Tabs Slots
-| Name | Description |
-|------|------|
-| nav-left | Custom nav left content |
+| Name | Description |
+| --------- | ------------------------ |
+| nav-left | Custom nav left content |
| nav-right | Custom nav right content |
### Tab Slots
-| Name | Description |
-|------|------|
-| default | Content of tab |
-| title | Custom tab title |
+| Name | Description |
+| ------- | ---------------- |
+| default | Content of tab |
+| title | Custom tab title |
diff --git a/src/tab/README.zh-CN.md b/src/tab/README.zh-CN.md
index 7738f6c93..d7601af9e 100644
--- a/src/tab/README.zh-CN.md
+++ b/src/tab/README.zh-CN.md
@@ -29,10 +29,10 @@ Vue.use(Tabs);
export default {
data() {
return {
- active: 2
+ active: 2,
};
- }
-}
+ },
+};
```
### 通过名称匹配
@@ -51,10 +51,10 @@ export default {
export default {
data() {
return {
- activeName: 'a'
+ activeName: 'a',
};
- }
-}
+ },
+};
```
### 标签栏滚动
@@ -88,8 +88,8 @@ export default {
methods: {
onClickDisabled(name, title) {
Toast(name + '已被禁用');
- }
- }
+ },
+ },
};
```
@@ -123,8 +123,8 @@ export default {
methods: {
onClick(name, title) {
Toast(title);
- }
- }
+ },
+ },
};
```
@@ -147,9 +147,7 @@ export default {
```html
-
- 选项
-
+ 选项
内容 {{ index }}
@@ -196,45 +194,45 @@ export default {
### Tabs Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| v-model | 绑定当前选中标签的标识符 | *number \| string* | `0` |
-| type | 样式风格类型,可选值为`card` | *string* | `line` |
-| color | 标签主题色 | *string* | `#ee0a24` |
-| background | 标签栏背景色 | *string* | `white` |
-| duration | 动画时间,单位秒 | *number \| string* | `0.3` |
-| line-width | 底部条宽度,默认单位`px` | *number \| string* | `auto` |
-| line-height | 底部条高度,默认单位`px` | *number \| string* | `3px` |
-| animated | 是否开启切换标签内容时的转场动画 | *boolean* | `false` |
-| border | 是否显示标签栏外边框,仅在`type="line"`时有效 | *boolean* | `true` |
-| ellipsis | 是否省略过长的标题文字 | *boolean* | `true` |
-| sticky | 是否使用粘性定位布局 | *boolean* | `false` |
-| swipeable | 是否开启手势滑动切换 | *boolean* | `false` |
-| lazy-render | 是否开启延迟渲染(首次切换到标签时才触发内容渲染) | *boolean* | `true` |
-| scrollspy `v2.3.0` | 是否开启滚动导航 | *boolean* | `false` |
-| offset-top | 粘性定位布局下与顶部的最小距离,单位`px` | *number \| string* | `0` |
-| swipe-threshold | 滚动阈值,标签数量超过阈值时开始横向滚动 | *number \| string* | `4` |
-| title-active-color | 标题选中态颜色 | *string* | - |
-| title-inactive-color | 标题默认态颜色 | *string* | - |
+| --- | --- | --- | --- |
+| v-model | 绑定当前选中标签的标识符 | _number \| string_ | `0` |
+| type | 样式风格类型,可选值为`card` | _string_ | `line` |
+| color | 标签主题色 | _string_ | `#ee0a24` |
+| background | 标签栏背景色 | _string_ | `white` |
+| duration | 动画时间,单位秒 | _number \| string_ | `0.3` |
+| line-width | 底部条宽度,默认单位`px` | _number \| string_ | `auto` |
+| line-height | 底部条高度,默认单位`px` | _number \| string_ | `3px` |
+| animated | 是否开启切换标签内容时的转场动画 | _boolean_ | `false` |
+| border | 是否显示标签栏外边框,仅在`type="line"`时有效 | _boolean_ | `true` |
+| ellipsis | 是否省略过长的标题文字 | _boolean_ | `true` |
+| sticky | 是否使用粘性定位布局 | _boolean_ | `false` |
+| swipeable | 是否开启手势滑动切换 | _boolean_ | `false` |
+| lazy-render | 是否开启延迟渲染(首次切换到标签时才触发内容渲染) | _boolean_ | `true` |
+| scrollspy `v2.3.0` | 是否开启滚动导航 | _boolean_ | `false` |
+| offset-top | 粘性定位布局下与顶部的最小距离,单位`px` | _number \| string_ | `0` |
+| swipe-threshold | 滚动阈值,标签数量超过阈值时开始横向滚动 | _number \| string_ | `4` |
+| title-active-color | 标题选中态颜色 | _string_ | - |
+| title-inactive-color | 标题默认态颜色 | _string_ | - |
### Tab Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| title | 标题 | *string* | - |
-| disabled | 是否禁用标签 | *boolean* | `false` |
-| dot `v2.3.0` | 是否在标题右上角显示小红点 | *boolean* | `false` |
-| badge `v2.5.6` | 图标右上角徽标的内容 | *number \| string* | - |
-| info `v2.3.0` | 图标右上角徽标的内容(已废弃,请使用 badge 属性) | *number \| string* | - |
-| name `v2.0.6` | 标签名称,作为匹配的标识符 | *number \| string* | 标签的索引值 |
-| url `v2.2.1` | 点击后跳转的链接地址 | *string* | - |
-| to `v2.2.1` | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | *string \| object* | - |
-| replace `v2.2.1` | 是否在跳转时替换当前页面历史 | *boolean* | `false` |
-| title-style `v2.2.14` | 自定义标题样式 | *any* | - |
+| --- | --- | --- | --- |
+| title | 标题 | _string_ | - |
+| disabled | 是否禁用标签 | _boolean_ | `false` |
+| dot `v2.3.0` | 是否在标题右上角显示小红点 | _boolean_ | `false` |
+| badge `v2.5.6` | 图标右上角徽标的内容 | _number \| string_ | - |
+| info `v2.3.0` | 图标右上角徽标的内容(已废弃,请使用 badge 属性) | _number \| string_ | - |
+| name `v2.0.6` | 标签名称,作为匹配的标识符 | _number \| string_ | 标签的索引值 |
+| url `v2.2.1` | 点击后跳转的链接地址 | _string_ | - |
+| to `v2.2.1` | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | _string \| object_ | - |
+| replace `v2.2.1` | 是否在跳转时替换当前页面历史 | _boolean_ | `false` |
+| title-style `v2.2.14` | 自定义标题样式 | _any_ | - |
### Tabs Events
| 事件名 | 说明 | 回调参数 |
-|------|------|------|
+| --- | --- | --- |
| click | 点击标签时触发 | name:标识符,title:标题 |
| change | 当前激活的标签改变时触发 | name:标识符,title:标题 |
| disabled | 点击被禁用的标签时触发 | name:标识符,title:标题 |
@@ -245,20 +243,20 @@ export default {
通过 ref 可以获取到 Tabs 实例并调用实例方法,详见[组件实例方法](#/zh-CN/quickstart#zu-jian-shi-li-fang-fa)
-| 方法名 | 说明 | 参数 | 返回值 |
-|------|------|------|------|
-| resize | 外层元素大小变化后,可以调用此方法来触发重绘 | - | void |
+| 方法名 | 说明 | 参数 | 返回值 |
+| ------ | -------------------------------------------- | ---- | ------ |
+| resize | 外层元素大小变化后,可以调用此方法来触发重绘 | - | void |
### Tabs Slots
-| 名称 | 说明 |
-|------|------|
-| nav-left | 标题左侧内容 |
+| 名称 | 说明 |
+| --------- | ------------ |
+| nav-left | 标题左侧内容 |
| nav-right | 标题右侧内容 |
### Tab Slots
-| 名称 | 说明 |
-|------|------|
-| default | 标签页内容 |
-| title | 自定义标题,不支持动态渲染 |
+| 名称 | 说明 |
+| ------- | -------------------------- |
+| default | 标签页内容 |
+| title | 自定义标题,不支持动态渲染 |
diff --git a/src/tabbar/README.md b/src/tabbar/README.md
index 37ca74bdd..76961ddb7 100644
--- a/src/tabbar/README.md
+++ b/src/tabbar/README.md
@@ -27,10 +27,10 @@ Vue.use(TabbarItem);
export default {
data() {
return {
- active: 0
- }
- }
-}
+ active: 0,
+ };
+ },
+};
```
### Match by name
@@ -48,10 +48,10 @@ export default {
export default {
data() {
return {
- active: 'home'
- }
- }
-}
+ active: 'home',
+ };
+ },
+};
```
### Show Badge
@@ -73,9 +73,9 @@ Use `icon` slot to custom icon
Custom
-
-
-
+
+
+
Tab
Tab
@@ -89,21 +89,17 @@ export default {
active: 0,
icon: {
active: 'https://img.yzcdn.cn/vant/user-active.png',
- inactive: 'https://img.yzcdn.cn/vant/user-inactive.png'
- }
- }
- }
-}
+ inactive: 'https://img.yzcdn.cn/vant/user-inactive.png',
+ },
+ };
+ },
+};
```
### Custom Color
```html
-
+
Tab
Tab
Tab
@@ -111,7 +107,6 @@ export default {
```
-
### Change Event
```html
@@ -130,9 +125,9 @@ export default {
methods: {
onChange(index) {
Notify({ type: 'primary', message: index });
- }
- }
-}
+ },
+ },
+};
```
### Route Mode
@@ -155,38 +150,38 @@ export default {
### Tabbar Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| v-model | Identifier of current tab | *number \| string* | `0` |
-| fixed | Whether to fixed bottom | *boolean* | `true` |
-| border | Whether to show border | *boolean* | `true` |
-| z-index | Z-index | *number \| string* | `1` |
-| active-color | Color of active tab item | *string* | `#1989fa` |
-| inactive-color | Color of inactive tab item | *string* | `#7d7e80` |
-| route | Whether to enable route mode | *boolean* | `false` |
-| placeholder `v2.6.0` | Whether to generage a placeholder element when fixed | *boolean* | `false` |
-| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `false` |
+| --- | --- | --- | --- |
+| v-model | Identifier of current tab | _number \| string_ | `0` |
+| fixed | Whether to fixed bottom | _boolean_ | `true` |
+| border | Whether to show border | _boolean_ | `true` |
+| z-index | Z-index | _number \| string_ | `1` |
+| active-color | Color of active tab item | _string_ | `#1989fa` |
+| inactive-color | Color of inactive tab item | _string_ | `#7d7e80` |
+| route | Whether to enable route mode | _boolean_ | `false` |
+| placeholder `v2.6.0` | Whether to generage a placeholder element when fixed | _boolean_ | `false` |
+| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `false` |
### Tabbar Events
-| Event | Description | Arguments |
-|------|------|------|
+| Event | Description | Arguments |
+| ------ | -------------------------------- | ---------------------------- |
| change | Triggered when change active tab | active: index of current tab |
### TabbarItem Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| name | Identifier | *number \| string* | Item index |
-| icon | Icon name | *string* | - |
-| icon-prefix `v2.5.3` | Icon className prefix | *string* | `van-icon` |
-| dot | Whether to show red dot | *boolean* | - |
-| badge `v2.5.6` | Content of the badge | *number \| string* | `''` |
-| url | Link | *string* | - |
-| to | Target route of the link, same as to of vue-router | *string \| object* | - |
-| replace | If true, the navigation will not leave a history record | *boolean* | `false` |
+| --- | --- | --- | --- |
+| name | Identifier | _number \| string_ | Item index |
+| icon | Icon name | _string_ | - |
+| icon-prefix `v2.5.3` | Icon className prefix | _string_ | `van-icon` |
+| dot | Whether to show red dot | _boolean_ | - |
+| badge `v2.5.6` | Content of the badge | _number \| string_ | `''` |
+| url | Link | _string_ | - |
+| to | Target route of the link, same as to of vue-router | _string \| object_ | - |
+| replace | If true, the navigation will not leave a history record | _boolean_ | `false` |
### TabbarItem Slots
| Name | Description | SlotProps |
-|------|------|------|
-| icon | Custom icon | active |
+| ---- | ----------- | --------- |
+| icon | Custom icon | active |
diff --git a/src/tabbar/README.zh-CN.md b/src/tabbar/README.zh-CN.md
index 36eb1aabe..29fec35d9 100644
--- a/src/tabbar/README.zh-CN.md
+++ b/src/tabbar/README.zh-CN.md
@@ -29,10 +29,10 @@ Vue.use(TabbarItem);
export default {
data() {
return {
- active: 0
- }
- }
-}
+ active: 0,
+ };
+ },
+};
```
### 通过名称匹配
@@ -52,10 +52,10 @@ export default {
export default {
data() {
return {
- active: 'home'
- }
- }
-}
+ active: 'home',
+ };
+ },
+};
```
### 徽标提示
@@ -79,9 +79,9 @@ export default {
自定义
-
-
-
+
+
+
标签
标签
@@ -95,21 +95,17 @@ export default {
active: 0,
icon: {
active: 'https://img.yzcdn.cn/vant/user-active.png',
- inactive: 'https://img.yzcdn.cn/vant/user-inactive.png'
- }
- }
- }
-}
+ inactive: 'https://img.yzcdn.cn/vant/user-inactive.png',
+ },
+ };
+ },
+};
```
### 自定义颜色
```html
-
+
标签
标签
标签
@@ -135,9 +131,9 @@ export default {
methods: {
onChange(index) {
Notify({ type: 'primary', message: index });
- }
- }
-}
+ },
+ },
+};
```
### 路由模式
@@ -162,39 +158,39 @@ export default {
### Tabbar Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| v-model | 当前选中标签的名称或索引值 | *number \| string* | `0` |
-| fixed | 是否固定在底部 | *boolean* | `true` |
-| border | 是否显示外边框 | *boolean* | `true` |
-| z-index | 元素 z-index | *number \| string* | `1` |
-| active-color | 选中标签的颜色 | *string* | `#1989fa` |
-| inactive-color | 未选中标签的颜色 | *string* | `#7d7e80` |
-| route | 是否开启路由模式 | *boolean* | `false` |
-| placeholder `v2.6.0` | 固定在底部时,是否在标签位置生成一个等高的占位元素 | *boolean* | `false` |
-| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei),设置 fixed 时默认开启 | *boolean* | `false` |
+| --- | --- | --- | --- |
+| v-model | 当前选中标签的名称或索引值 | _number \| string_ | `0` |
+| fixed | 是否固定在底部 | _boolean_ | `true` |
+| border | 是否显示外边框 | _boolean_ | `true` |
+| z-index | 元素 z-index | _number \| string_ | `1` |
+| active-color | 选中标签的颜色 | _string_ | `#1989fa` |
+| inactive-color | 未选中标签的颜色 | _string_ | `#7d7e80` |
+| route | 是否开启路由模式 | _boolean_ | `false` |
+| placeholder `v2.6.0` | 固定在底部时,是否在标签位置生成一个等高的占位元素 | _boolean_ | `false` |
+| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei),设置 fixed 时默认开启 | _boolean_ | `false` |
### Tabbar Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
+| 事件名 | 说明 | 回调参数 |
+| ------ | -------------- | ---------------------------------- |
| change | 切换标签时触发 | active: 当前选中标签的名称或索引值 |
### TabbarItem Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| name | 标签名称,作为匹配的标识符 | *number \| string* | 当前标签的索引值 |
-| icon | [图标名称](#/zh-CN/icon)或图片链接| *string* | - |
-| icon-prefix `v2.5.3` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | *string* | `van-icon` |
-| dot | 是否显示图标右上角小红点 | *boolean* | `false` |
-| badge `v2.5.6` | 图标右上角徽标的内容 | *number \| string* | - |
-| info | 图标右上角徽标的内容(已废弃,请使用 badge 属性) | *number \| string* | - |
-| url | 点击后跳转的链接地址 | *string* | - |
-| to | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | *string \| object* | - |
-| replace | 是否在跳转时替换当前页面历史 | *boolean* | `false` |
+| --- | --- | --- | --- |
+| name | 标签名称,作为匹配的标识符 | _number \| string_ | 当前标签的索引值 |
+| icon | [图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
+| icon-prefix `v2.5.3` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | _string_ | `van-icon` |
+| dot | 是否显示图标右上角小红点 | _boolean_ | `false` |
+| badge `v2.5.6` | 图标右上角徽标的内容 | _number \| string_ | - |
+| info | 图标右上角徽标的内容(已废弃,请使用 badge 属性) | _number \| string_ | - |
+| url | 点击后跳转的链接地址 | _string_ | - |
+| to | 点击后跳转的目标路由对象,同 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) | _string \| object_ | - |
+| replace | 是否在跳转时替换当前页面历史 | _boolean_ | `false` |
### TabbarItem Slots
-| 名称 | 说明 | SlotProps |
-|------|------|------|
+| 名称 | 说明 | SlotProps |
+| ---- | ---------- | ---------------------- |
| icon | 自定义图标 | active: 是否为选中标签 |
diff --git a/src/tag/README.md b/src/tag/README.md
index 30fafaebc..eb36c57e8 100644
--- a/src/tag/README.md
+++ b/src/tag/README.md
@@ -98,16 +98,16 @@ export default {
return {
show: {
primary: true,
- success: true
- }
- }
+ success: true,
+ },
+ };
},
methods: {
close(type) {
this.show[type] = false;
- }
- }
-}
+ },
+ },
+};
```
## API
@@ -115,25 +115,25 @@ export default {
### Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| type | Type, can be set to `primary` `success` `danger` `warning` | *string* | `default` |
-| size | Size, can be set to `large` `medium` | *string* | - |
-| color | Custom color | *string* | - |
-| plain | Whether to be plain style | *boolean* | `false` |
-| round | Whether to be round style | *boolean* | `false` |
-| mark | Whether to be mark style | *boolean* | `false` |
-| text-color | Text color | *string* | `white` |
-| closeable `v2.2.9` | Whether to be closeable | *boolean* | `false` |
+| --- | --- | --- | --- |
+| type | Type, can be set to `primary` `success` `danger` `warning` | _string_ | `default` |
+| size | Size, can be set to `large` `medium` | _string_ | - |
+| color | Custom color | _string_ | - |
+| plain | Whether to be plain style | _boolean_ | `false` |
+| round | Whether to be round style | _boolean_ | `false` |
+| mark | Whether to be mark style | _boolean_ | `false` |
+| text-color | Text color | _string_ | `white` |
+| closeable `v2.2.9` | Whether to be closeable | _boolean_ | `false` |
### Slots
-| Name | Description |
-|------|------|
+| Name | Description |
+| ------- | ------------ |
| default | Default slot |
### Events
-| Event | Description | Arguments |
-|------|------|------|
-| click | Triggered when clicked | *event: Event* |
-| close | Triggered when click close icon | - |
+| Event | Description | Arguments |
+| ----- | ------------------------------- | -------------- |
+| click | Triggered when clicked | _event: Event_ |
+| close | Triggered when click close icon | - |
diff --git a/src/tag/README.zh-CN.md b/src/tag/README.zh-CN.md
index da2db434b..34b682c6f 100644
--- a/src/tag/README.zh-CN.md
+++ b/src/tag/README.zh-CN.md
@@ -108,16 +108,16 @@ export default {
return {
show: {
primary: true,
- success: true
- }
- }
+ success: true,
+ },
+ };
},
methods: {
close(type) {
this.show[type] = false;
- }
- }
-}
+ },
+ },
+};
```
## API
@@ -125,25 +125,25 @@ export default {
### Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| type | 类型,可选值为`primary` `success` `danger` `warning` | *string* | `default` |
-| size | 大小, 可选值为`large` `medium` | *string* | - |
-| color | 标签颜色 | *string* | - |
-| plain | 是否为空心样式 | *boolean* | `false` |
-| round | 是否为圆角样式 | *boolean* | `false` |
-| mark | 是否为标记样式 | *boolean* | `false` |
-| text-color | 文本颜色,优先级高于`color`属性 | *string* | `white` |
-| closeable `v2.2.9` | 是否为可关闭标签 | *boolean* | `false` |
+| --- | --- | --- | --- |
+| type | 类型,可选值为`primary` `success` `danger` `warning` | _string_ | `default` |
+| size | 大小, 可选值为`large` `medium` | _string_ | - |
+| color | 标签颜色 | _string_ | - |
+| plain | 是否为空心样式 | _boolean_ | `false` |
+| round | 是否为圆角样式 | _boolean_ | `false` |
+| mark | 是否为标记样式 | _boolean_ | `false` |
+| text-color | 文本颜色,优先级高于`color`属性 | _string_ | `white` |
+| closeable `v2.2.9` | 是否为可关闭标签 | _boolean_ | `false` |
### Slots
-| 名称 | 说明 |
-|------|------|
+| 名称 | 说明 |
+| ------- | ------------ |
| default | 标签显示内容 |
### Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
-| click | 点击时触发 | *event: Event* |
-| close | 关闭标签时触发 | - |
+| 事件名 | 说明 | 回调参数 |
+| ------ | -------------- | -------------- |
+| click | 点击时触发 | _event: Event_ |
+| close | 关闭标签时触发 | - |
diff --git a/src/toast/README.md b/src/toast/README.md
index 10470f1c5..8cd70a816 100644
--- a/src/toast/README.md
+++ b/src/toast/README.md
@@ -22,13 +22,13 @@ Toast('Some messages');
```js
Toast.loading({
message: 'Loading...',
- forbidClick: true
+ forbidClick: true,
});
Toast.loading({
message: 'Loading...',
forbidClick: true,
- loadingType: 'spinner'
+ loadingType: 'spinner',
});
```
@@ -44,12 +44,12 @@ Toast.fail('Fail');
```js
Toast({
message: 'Custom Icon',
- icon: 'like-o'
+ icon: 'like-o',
});
Toast({
message: 'Custom Image',
- icon: 'https://img.yzcdn.cn/vant/logo.png'
+ icon: 'https://img.yzcdn.cn/vant/logo.png',
});
```
@@ -60,7 +60,7 @@ const toast = Toast.loading({
duration: 0, // continuous display toast
forbidClick: true,
loadingType: 'spinner',
- message: '3 seconds'
+ message: '3 seconds',
});
let second = 3;
@@ -75,16 +75,16 @@ const timer = setInterval(() => {
}, 1000);
```
-### $toast Method
+### \$toast 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 import the Toast component, the \$toast method is automatically mounted on Vue.prototype, making it easy to call within a vue component.
```js
export default {
mounted() {
this.$toast('Some messages');
- }
-}
+ },
+};
```
### Singleton
@@ -124,7 +124,7 @@ Toast.resetDefaultOptions('loading');
### Methods
| Methods | Attribute | Return value | Description |
-|------|------|------|------|
+| --- | --- | --- | --- |
| Toast | `options | message` | toast instance | Show toast |
| Toast.loading | `options | message` | toast instance | Show loading toast |
| Toast.success | `options | message` | toast instance | Show success toast |
@@ -137,20 +137,20 @@ Toast.resetDefaultOptions('loading');
### Options
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| type | Can be set to `loading` `success` `fail` `html` | *string* | `text` |
-| position | Can be set to `top` `middle` `bottom` | *string* | `middle` |
-| message | Message | *string* | `''` |
-| icon `v2.0.1` | Custom icon | *string* | - |
-| iconPrefix `v2.0.9` | Icon className prefix | *string* | `van-icon` |
-| overlay `v2.2.13` | Whether to show overlay | *boolean* | `false` |
-| forbidClick | Whether to forbid click background | *boolean* | `false` |
-| closeOnClick `v2.1.5` | Whether to close after clicked | *boolean* | `false` |
-| closeOnClickOverlay `v2.2.13` | Whether to close when click overlay | *boolean* | `false` |
-| loadingType | Loading icon type, can be set to `spinner` | *string* | `circular` |
-| duration | Toast duration(ms), won't disappear if value is 0 | *number* | `2000` |
-| className | Custom className | *any* | - |
-| onOpened | Callback function after opened | *Function* | - |
-| onClose | Callback function after close | *Function* | - |
-| transition `v2.2.6` | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | *string* | `van-fade` |
-| getContainer | Return the mount node for Toast | *string \| () => Element* | `body` |
+| --- | --- | --- | --- |
+| type | Can be set to `loading` `success` `fail` `html` | _string_ | `text` |
+| position | Can be set to `top` `middle` `bottom` | _string_ | `middle` |
+| message | Message | _string_ | `''` |
+| icon `v2.0.1` | Custom icon | _string_ | - |
+| iconPrefix `v2.0.9` | Icon className prefix | _string_ | `van-icon` |
+| overlay `v2.2.13` | Whether to show overlay | _boolean_ | `false` |
+| forbidClick | Whether to forbid click background | _boolean_ | `false` |
+| closeOnClick `v2.1.5` | Whether to close after clicked | _boolean_ | `false` |
+| closeOnClickOverlay `v2.2.13` | Whether to close when click overlay | _boolean_ | `false` |
+| loadingType | Loading icon type, can be set to `spinner` | _string_ | `circular` |
+| duration | Toast duration(ms), won't disappear if value is 0 | _number_ | `2000` |
+| className | Custom className | _any_ | - |
+| onOpened | Callback function after opened | _Function_ | - |
+| onClose | Callback function after close | _Function_ | - |
+| transition `v2.2.6` | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` |
+| getContainer | Return the mount node for Toast | _string \| () => Element_ | `body` |
diff --git a/src/toast/README.zh-CN.md b/src/toast/README.zh-CN.md
index af26fb974..e3abff0fb 100644
--- a/src/toast/README.zh-CN.md
+++ b/src/toast/README.zh-CN.md
@@ -24,14 +24,14 @@ Toast('提示内容');
```js
Toast.loading({
message: '加载中...',
- forbidClick: true
+ forbidClick: true,
});
// 自定义加载图标
Toast.loading({
message: '加载中...',
forbidClick: true,
- loadingType: 'spinner'
+ loadingType: 'spinner',
});
```
@@ -47,12 +47,12 @@ Toast.fail('失败文案');
```js
Toast({
message: '自定义图标',
- icon: 'like-o'
+ icon: 'like-o',
});
Toast({
message: '展示图片',
- icon: 'https://img.yzcdn.cn/vant/logo.png'
+ icon: 'https://img.yzcdn.cn/vant/logo.png',
});
```
@@ -62,7 +62,7 @@ Toast({
const toast = Toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true,
- message: '倒计时 3 秒'
+ message: '倒计时 3 秒',
});
let second = 3;
@@ -80,14 +80,14 @@ const timer = setInterval(() => {
### 组件内调用
-引入 Toast 组件后,会自动在 Vue 的 prototype 上挂载 $toast 方法,便于在组件内调用。
+引入 Toast 组件后,会自动在 Vue 的 prototype 上挂载 \$toast 方法,便于在组件内调用。
```js
export default {
mounted() {
this.$toast('提示文案');
- }
-}
+ },
+};
```
### 单例模式
@@ -127,7 +127,7 @@ Toast.resetDefaultOptions('loading');
### 方法
| 方法名 | 说明 | 参数 | 返回值 |
-|------|------|------|------|
+| --- | --- | --- | --- |
| Toast | 展示提示 | `options | message` | toast 实例 |
| Toast.loading | 展示加载提示 | `options | message` | toast 实例 |
| Toast.success | 展示成功提示 | `options | message` | toast 实例 |
@@ -140,20 +140,20 @@ Toast.resetDefaultOptions('loading');
### Options
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| type | 提示类型,可选值为 `loading` `success`
`fail` `html` | *string* | `text` |
-| position | 位置,可选值为 `top` `bottom` | *string* | `middle` |
-| message | 文本内容,支持通过`\n`换行 | *string* | `''` | - |
-| icon `v2.0.1` | 自定义图标,支持传入[图标名称](#/zh-CN/icon)或图片链接 | *string* | - |
-| iconPrefix `v2.0.9` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | *string* | `van-icon` |
-| overlay `v2.2.13` | 是否显示背景遮罩层 | *boolean* | `false` |
-| forbidClick | 是否禁止背景点击 | *boolean* | `false` |
-| closeOnClick `v2.1.5` | 是否在点击后关闭 | *boolean* | `false` |
-| closeOnClickOverlay `v2.2.13` | 是否在点击遮罩层后关闭 | *boolean* | `false` |
-| loadingType | [加载图标类型](#/zh-CN/loading), 可选值为 `spinner` | *string* | `circular` |
-| duration | 展示时长(ms),值为 0 时,toast 不会消失 | *number* | `2000` |
-| className | 自定义类名 | *any* | - |
-| onOpened | 完全展示后的回调函数 | *Function* | - |
-| onClose | 关闭时的回调函数 | *Function* | - |
-| transition `v2.2.6` | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | *string* | `van-fade` |
-| getContainer | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | *string \| () => Element* | `body` |
+| --- | --- | --- | --- |
+| type | 提示类型,可选值为 `loading` `success`
`fail` `html` | _string_ | `text` |
+| position | 位置,可选值为 `top` `bottom` | _string_ | `middle` |
+| message | 文本内容,支持通过`\n`换行 | _string_ | `''` | - |
+| icon `v2.0.1` | 自定义图标,支持传入[图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
+| iconPrefix `v2.0.9` | 图标类名前缀,同 Icon 组件的 [class-prefix 属性](#/zh-CN/icon#props) | _string_ | `van-icon` |
+| overlay `v2.2.13` | 是否显示背景遮罩层 | _boolean_ | `false` |
+| forbidClick | 是否禁止背景点击 | _boolean_ | `false` |
+| closeOnClick `v2.1.5` | 是否在点击后关闭 | _boolean_ | `false` |
+| closeOnClickOverlay `v2.2.13` | 是否在点击遮罩层后关闭 | _boolean_ | `false` |
+| loadingType | [加载图标类型](#/zh-CN/loading), 可选值为 `spinner` | _string_ | `circular` |
+| duration | 展示时长(ms),值为 0 时,toast 不会消失 | _number_ | `2000` |
+| className | 自定义类名 | _any_ | - |
+| onOpened | 完全展示后的回调函数 | _Function_ | - |
+| onClose | 关闭时的回调函数 | _Function_ | - |
+| transition `v2.2.6` | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | `van-fade` |
+| getContainer | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | `body` |
diff --git a/src/tree-select/README.md b/src/tree-select/README.md
index 4b7354aea..f8aa6338e 100644
--- a/src/tree-select/README.md
+++ b/src/tree-select/README.md
@@ -27,10 +27,10 @@ export default {
return {
items,
activeId: 1,
- activeIndex: 0
+ activeIndex: 0,
};
- }
-}
+ },
+};
```
### Multiple Mode
@@ -49,23 +49,25 @@ export default {
return {
items,
activeIds: [1, 2],
- activeIndex: 0
+ activeIndex: 0,
};
- }
-}
+ },
+};
```
### Custom Content
```html
-
+
-
-
+
+
```
@@ -75,10 +77,10 @@ export default {
data() {
return {
active: 0,
- items: [{ text: 'Group 1' }, { text: 'Group 2' }]
- }
- }
-}
+ items: [{ text: 'Group 1' }, { text: 'Group 2' }],
+ };
+ },
+};
```
### Show Badge
@@ -98,11 +100,11 @@ export default {
activeIndex: 0,
items: [
{ text: 'Group 1', children: [], dot: true },
- { text: 'Group 2', children: [], badge: 5 }
- ]
- }
- }
-}
+ { text: 'Group 2', children: [], badge: 5 },
+ ],
+ };
+ },
+};
```
## API
@@ -110,24 +112,24 @@ export default {
### Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| items | Required datasets for the component | *Item[]* | `[]` |
-| height | Height | *number \| string* | `300` |
-| main-active-index | The index of selected parent node | *number \| string* | `0` |
-| active-id | Id of selected item | *number \| string \|
(number \| string)[]* | `0` |
-| max `v2.2.0` | Maximum number of selected items | *number \| string* | `Infinity` |
+| --- | --- | --- | --- |
+| items | Required datasets for the component | _Item[]_ | `[]` |
+| height | Height | _number \| string_ | `300` |
+| main-active-index | The index of selected parent node | _number \| string_ | `0` |
+| active-id | Id of selected item | _number \| string \|
(number \| string)[]_ | `0` |
+| max `v2.2.0` | Maximum number of selected items | _number \| string_ | `Infinity` |
### Events
| Event | Description | Arguments |
-|------|------|------|
+| --- | --- | --- |
| click-nav | triggered when parent node is selected | index: index of selected parent |
| click-item | triggered when item is selected | data: selected item |
### Slots
-| Name | Description |
-|------|------|
+| Name | Description |
+| ------- | -------------------- |
| content | Custom right content |
### Data Structure of Item
@@ -155,13 +157,13 @@ In every tree object, `text` property defines `id` stands for the unique key whi
// id of the leaf node, component highlights leaf node by comparing the activeId with this.
id: 1,
// disable options
- disabled: true
+ disabled: true,
},
{
text: 'Baltimore',
- id: 2
- }
- ]
- }
-]
+ id: 2,
+ },
+ ],
+ },
+];
```
diff --git a/src/tree-select/README.zh-CN.md b/src/tree-select/README.zh-CN.md
index e3a12ed50..c2c7e7939 100644
--- a/src/tree-select/README.zh-CN.md
+++ b/src/tree-select/README.zh-CN.md
@@ -29,10 +29,10 @@ export default {
return {
items,
activeId: 1,
- activeIndex: 0
+ activeIndex: 0,
};
- }
-}
+ },
+};
```
### 多选模式
@@ -53,10 +53,10 @@ export default {
return {
items,
activeIds: [1, 2],
- activeIndex: 0
+ activeIndex: 0,
};
- }
-}
+ },
+};
```
### 自定义内容
@@ -64,14 +64,16 @@ export default {
通过`content`插槽可以自定义右侧区域的内容
```html
-
+
-
-
+
+
```
@@ -81,10 +83,10 @@ export default {
data() {
return {
active: 0,
- items: [{ text: '分组 1' }, { text: '分组 2' }]
- }
- }
-}
+ items: [{ text: '分组 1' }, { text: '分组 2' }],
+ };
+ },
+};
```
### 徽标提示
@@ -106,11 +108,11 @@ export default {
activeIndex: 0,
items: [
{ text: '浙江', children: [], dot: true },
- { text: '江苏', children: [], badge: 5 }
- ]
- }
- }
-}
+ { text: '江苏', children: [], badge: 5 },
+ ],
+ };
+ },
+};
```
## API
@@ -118,24 +120,24 @@ export default {
### Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| items | 分类显示所需的数据 | *Item[]* | `[]` |
-| height | 高度,默认单位为`px` | *number \| string* | `300` |
-| main-active-index | 左侧选中项的索引 | *number \| string* | `0` |
-| active-id | 右侧选中项的 id,支持传入数组 | *number \| string \|
(number \| string)[]* | `0` |
-| max `v2.2.0` | 右侧项最大选中个数 | *number \| string* | `Infinity` |
+| --- | --- | --- | --- |
+| items | 分类显示所需的数据 | _Item[]_ | `[]` |
+| height | 高度,默认单位为`px` | _number \| string_ | `300` |
+| main-active-index | 左侧选中项的索引 | _number \| string_ | `0` |
+| active-id | 右侧选中项的 id,支持传入数组 | _number \| string \|
(number \| string)[]_ | `0` |
+| max `v2.2.0` | 右侧项最大选中个数 | _number \| string_ | `Infinity` |
### Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
-| click-nav | 点击左侧导航时触发 | index:被点击的导航的索引 |
-| click-item | 点击右侧选择项时触发 | data: 该点击项的数据 |
+| 事件名 | 说明 | 回调参数 |
+| ---------- | -------------------- | ------------------------- |
+| click-nav | 点击左侧导航时触发 | index:被点击的导航的索引 |
+| click-item | 点击右侧选择项时触发 | data: 该点击项的数据 |
### Slots
-| 名称 | 说明 |
-|------|------|
+| 名称 | 说明 |
+| ------- | ------------------ |
| content | 自定义右侧区域内容 |
### Item 数据结构
@@ -161,13 +163,13 @@ export default {
// id,作为匹配选中状态的标识符
id: 1,
// 禁用选项
- disabled: true
+ disabled: true,
},
{
text: '杭州',
- id: 2
- }
- ]
- }
-]
+ id: 2,
+ },
+ ],
+ },
+];
```
diff --git a/src/uploader/README.md b/src/uploader/README.md
index cb7bf1062..4cbe7feb4 100644
--- a/src/uploader/README.md
+++ b/src/uploader/README.md
@@ -21,9 +21,9 @@ Vue.use(Uploader);
export default {
methods: {
afterRead(file) {
- console.log(file)
- }
- }
+ console.log(file);
+ },
+ },
};
```
@@ -37,13 +37,12 @@ export default {
export default {
data() {
return {
- fileList: [
- { url: 'https://img.yzcdn.cn/vant/leaf.jpg' }
- ]
- }
- }
+ fileList: [{ url: 'https://img.yzcdn.cn/vant/leaf.jpg' }],
+ };
+ },
};
```
+
### Disabled
```html
@@ -64,15 +63,15 @@ export default {
{
url: 'https://img.yzcdn.cn/vant/leaf.jpg',
status: 'uploading',
- message: 'Uploading...'
+ message: 'Uploading...',
},
{
url: 'https://img.yzcdn.cn/vant/tree.jpg',
status: 'failed',
- message: 'Failed'
- }
- ]
- }
+ message: 'Failed',
+ },
+ ],
+ };
},
methods: {
afterRead(file) {
@@ -83,28 +82,24 @@ export default {
file.status = 'failed';
file.message = 'Failed';
}, 1000);
- }
- }
+ },
+ },
};
```
### Max Count
```html
-
+
```
```js
export default {
data() {
return {
- fileList: []
- }
- }
+ fileList: [],
+ };
+ },
};
```
@@ -140,15 +135,15 @@ export default {
Toast('Please upload an image in jpg format');
reject();
} else {
- let img = new File(["foo"], "bar.jpg", {
- type: "image/jpeg",
+ let img = new File(['foo'], 'bar.jpg', {
+ type: 'image/jpeg',
});
resolve(img);
}
});
- }
- }
-}
+ },
+ },
+};
```
## API
@@ -156,31 +151,31 @@ export default {
### Props
| Attribute | Description | Type | Default |
-|------|------|------|------|
-| accept | Accepted [file type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers) | *string* | `image/*` |
-| name `v2.0.3` | Input name | *number \| string* | - |
-| preview-size | Size of preview image | *number \| string* | `80px` |
-| preview-image `v2.1.5` | Whether to show image preview | *boolean* | `true` |
-| preview-full-image | Whethe to show full screen image preview when click image | *boolean* | `true` |
-| multiple | Whether to enable multiple selection pictures | *boolean* | `false` |
-| disabled | Whether to disabled the upload | *boolean* | `false` |
-| deletable `v2.2.12` | Whether to show delete icon | *boolean* | `true` |
-| show-upload `v2.5.6` | Whether to show upload area | *boolean* | `true` |
-| capture | Capture,can be set to `camera` | *string* | - |
-| after-read | Hook after reading the file | *Function* | - |
-| before-read | Hook before reading the file, return false to stop reading the file, can return Promise | *Function* | - |
-| before-delete | Hook before delete the file, return false to stop reading the file, can return Promise | *Function* | - |
-| max-size | Max size of file | *number \| string* | - |
-| max-count | Max count of image | *number \| string* | - |
-| result-type `v2.2.7` | Type of file read result, can be set to `file` `text` | *string* | `dataUrl` |
-| upload-text | Upload text | *string* | - |
-| image-fit `v2.1.5` | Preview image fit mode | *string* | `cover` |
-| upload-icon `v2.5.4` | Upload icon | *string* | `photograph` |
+| --- | --- | --- | --- |
+| accept | Accepted [file type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers) | _string_ | `image/*` |
+| name `v2.0.3` | Input name | _number \| string_ | - |
+| preview-size | Size of preview image | _number \| string_ | `80px` |
+| preview-image `v2.1.5` | Whether to show image preview | _boolean_ | `true` |
+| preview-full-image | Whethe to show full screen image preview when click image | _boolean_ | `true` |
+| multiple | Whether to enable multiple selection pictures | _boolean_ | `false` |
+| disabled | Whether to disabled the upload | _boolean_ | `false` |
+| deletable `v2.2.12` | Whether to show delete icon | _boolean_ | `true` |
+| show-upload `v2.5.6` | Whether to show upload area | _boolean_ | `true` |
+| capture | Capture,can be set to `camera` | _string_ | - |
+| after-read | Hook after reading the file | _Function_ | - |
+| before-read | Hook before reading the file, return false to stop reading the file, can return Promise | _Function_ | - |
+| before-delete | Hook before delete the file, return false to stop reading the file, can return Promise | _Function_ | - |
+| max-size | Max size of file | _number \| string_ | - |
+| max-count | Max count of image | _number \| string_ | - |
+| result-type `v2.2.7` | Type of file read result, can be set to `file` `text` | _string_ | `dataUrl` |
+| upload-text | Upload text | _string_ | - |
+| image-fit `v2.1.5` | Preview image fit mode | _string_ | `cover` |
+| upload-icon `v2.5.4` | Upload icon | _string_ | `photograph` |
### Events
| Event | Description | Arguments |
-|------|------|------|
+| --- | --- | --- |
| oversize | Triggered when file size over limit | Same as after-read |
| click-preview | Triggered when click preview image | Same as after-read |
| close-preview | Triggered when close full screen image preview | - |
@@ -188,23 +183,23 @@ export default {
### Slots
-| Name | Description |
-|------|------|
+| Name | Description |
+| ------- | ----------- |
| default | Custom icon |
### Parematers of before-read、after-read、before-delete
-| Attribute | Description | Type |
-|------|------|------|
-| file | File object | *object* |
-| detail | Detail info, contains name and index | *object* |
+| Attribute | Description | Type |
+| --------- | ------------------------------------ | -------- |
+| file | File object | _object_ |
+| detail | Detail info, contains name and index | _object_ |
### ResultType
-| Value | Description |
-|------|------|
-| file | Result contains File object |
-| text | Result contains File object and text content |
+| Value | Description |
+| ------- | ---------------------------------------------- |
+| file | Result contains File object |
+| text | Result contains File object and text content |
| dataUrl | Result contains File object and base64 content |
### Methods
@@ -212,6 +207,6 @@ export default {
Use [ref](https://vuejs.org/v2/api/#ref) to get Uploader instance and call instance methods
| Name | Description | Attribute | Return value |
-|------|------|------|------|
+| --- | --- | --- | --- |
| closeImagePreview | Close full screen image preview | - | - |
| chooseFile `v2.5.6` | Trigger choosing files, works with the user action context only because of browser security | - | - |
diff --git a/src/uploader/README.zh-CN.md b/src/uploader/README.zh-CN.md
index e589f21ad..0eae6e5b3 100644
--- a/src/uploader/README.zh-CN.md
+++ b/src/uploader/README.zh-CN.md
@@ -25,8 +25,8 @@ export default {
afterRead(file) {
// 此时可以自行将文件上传至服务器
console.log(file);
- }
- }
+ },
+ },
};
```
@@ -46,10 +46,10 @@ export default {
{ url: 'https://img.yzcdn.cn/vant/leaf.jpg' },
// Uploader 根据文件后缀来判断是否为图片文件
// 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明
- { url: 'https://cloud-image', isImage: true }
- ]
- }
- }
+ { url: 'https://cloud-image', isImage: true },
+ ],
+ };
+ },
};
```
@@ -77,15 +77,15 @@ export default {
{
url: 'https://img.yzcdn.cn/vant/leaf.jpg',
status: 'uploading',
- message: '上传中...'
+ message: '上传中...',
},
{
url: 'https://img.yzcdn.cn/vant/tree.jpg',
status: 'failed',
- message: '上传失败'
- }
- ]
- }
+ message: '上传失败',
+ },
+ ],
+ };
},
methods: {
afterRead(file) {
@@ -96,8 +96,8 @@ export default {
file.status = 'failed';
file.message = '上传失败';
}, 1000);
- }
- }
+ },
+ },
};
```
@@ -106,20 +106,16 @@ export default {
通过`max-count`属性可以限制上传文件的数量,上传数量达到限制后,会自动隐藏上传区域
```html
-
+
```
```js
export default {
data() {
return {
- fileList: []
- }
- }
+ fileList: [],
+ };
+ },
};
```
@@ -161,15 +157,15 @@ export default {
Toast('请上传 jpg 格式图片');
reject();
} else {
- let img = new File(["foo"], "bar.jpg", {
- type: "image/jpeg",
+ let img = new File(['foo'], 'bar.jpg', {
+ type: 'image/jpeg',
});
resolve(img);
}
});
- }
- }
-}
+ },
+ },
+};
```
## API
@@ -177,59 +173,59 @@ export default {
### Props
| 参数 | 说明 | 类型 | 默认值 |
-|------|------|------|------|
-| accept | 允许上传的文件类型,[详细说明](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/file#%E9%99%90%E5%88%B6%E5%85%81%E8%AE%B8%E7%9A%84%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B) | *string* | `image/*` |
-| name `v2.0.3` | 标识符,可以在回调函数的第二项参数中获取 | *number \| string* | - |
-| preview-size | 预览图和上传区域的尺寸,默认单位为`px` | *number \| string* | `80px` |
-| preview-image | 是否在上传完成后展示预览图 | *boolean* | `true` |
-| preview-full-image `v2.1.5` | 是否在点击预览图后展示全屏图片预览 | *boolean* | `true` |
-| multiple | 是否开启图片多选,部分安卓机型不支持 | *boolean* | `false` |
-| disabled | 是否禁用文件上传 | *boolean* | `false` |
-| deletable `v2.2.12` | 是否展示删除按钮 | *boolean* | `true` |
-| show-upload `v2.5.6` | 是否展示上传区域 | *boolean* | `true` |
-| capture | 图片选取模式,可选值为`camera`(直接调起摄像头) | *string* | - |
-| after-read | 文件读取完成后的回调函数 | *Function* | - |
-| before-read | 文件读取前的回调函数,返回`false`可终止文件读取,
支持返回`Promise` | *Function* | - |
-| before-delete | 文件删除前的回调函数,返回`false`可终止文件读取,
支持返回`Promise` | *Function* | - |
-| max-size | 文件大小限制,单位为`byte` | *number \| string* | - |
-| max-count | 文件上传数量限制 | *number \| string* | - |
-| result-type `v2.2.7` | 文件读取结果类型,可选值为`file` `text` | *string* | `dataUrl` |
-| upload-text | 上传区域文字提示 | *string* | - |
-| image-fit `v2.1.5` | 预览图裁剪模式,可选值见 [Image](#/zh-CN/image) 组件 | *string* | `cover` |
-| upload-icon `v2.5.4` | 上传区域[图标名称](#/zh-CN/icon)或图片链接 | *string* | `photograph` |
+| --- | --- | --- | --- |
+| accept | 允许上传的文件类型,[详细说明](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/file#%E9%99%90%E5%88%B6%E5%85%81%E8%AE%B8%E7%9A%84%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B) | _string_ | `image/*` |
+| name `v2.0.3` | 标识符,可以在回调函数的第二项参数中获取 | _number \| string_ | - |
+| preview-size | 预览图和上传区域的尺寸,默认单位为`px` | _number \| string_ | `80px` |
+| preview-image | 是否在上传完成后展示预览图 | _boolean_ | `true` |
+| preview-full-image `v2.1.5` | 是否在点击预览图后展示全屏图片预览 | _boolean_ | `true` |
+| multiple | 是否开启图片多选,部分安卓机型不支持 | _boolean_ | `false` |
+| disabled | 是否禁用文件上传 | _boolean_ | `false` |
+| deletable `v2.2.12` | 是否展示删除按钮 | _boolean_ | `true` |
+| show-upload `v2.5.6` | 是否展示上传区域 | _boolean_ | `true` |
+| capture | 图片选取模式,可选值为`camera`(直接调起摄像头) | _string_ | - |
+| after-read | 文件读取完成后的回调函数 | _Function_ | - |
+| before-read | 文件读取前的回调函数,返回`false`可终止文件读取,
支持返回`Promise` | _Function_ | - |
+| before-delete | 文件删除前的回调函数,返回`false`可终止文件读取,
支持返回`Promise` | _Function_ | - |
+| max-size | 文件大小限制,单位为`byte` | _number \| string_ | - |
+| max-count | 文件上传数量限制 | _number \| string_ | - |
+| result-type `v2.2.7` | 文件读取结果类型,可选值为`file` `text` | _string_ | `dataUrl` |
+| upload-text | 上传区域文字提示 | _string_ | - |
+| image-fit `v2.1.5` | 预览图裁剪模式,可选值见 [Image](#/zh-CN/image) 组件 | _string_ | `cover` |
+| upload-icon `v2.5.4` | 上传区域[图标名称](#/zh-CN/icon)或图片链接 | _string_ | `photograph` |
### Events
-| 事件名 | 说明 | 回调参数 |
-|------|------|------|
-| oversize | 文件大小超过限制时触发 | 同`after-read` |
-| click-preview | 点击预览图时触发 | 同`after-read` |
-| close-preview | 关闭全屏图片预览时触发 | - |
-| delete | 删除文件预览时触发 | 同`after-read` |
+| 事件名 | 说明 | 回调参数 |
+| ------------- | ---------------------- | -------------- |
+| oversize | 文件大小超过限制时触发 | 同`after-read` |
+| click-preview | 点击预览图时触发 | 同`after-read` |
+| close-preview | 关闭全屏图片预览时触发 | - |
+| delete | 删除文件预览时触发 | 同`after-read` |
### Slots
-| 名称 | 说明 |
-|------|------|
+| 名称 | 说明 |
+| ------- | -------------- |
| default | 自定义上传区域 |
### 回调参数
before-read、after-read、before-delete 执行时会传递以下回调参数:
-| 参数名 | 说明 | 类型 |
-|------|------|------|
-| file | 文件解析后的 file 对象 | *object* |
-| detail | 额外信息,包含 name 和 index 字段 | *object* |
+| 参数名 | 说明 | 类型 |
+| ------ | --------------------------------- | -------- |
+| file | 文件解析后的 file 对象 | _object_ |
+| detail | 额外信息,包含 name 和 index 字段 | _object_ |
-### ResultType 可选值
+### ResultType 可选值
`result-type`字段表示文件读取结果的类型,上传大文件时,建议使用 file 类型,避免卡顿。
-| 值 | 描述 |
-|------|------|
-| file | 结果仅包含 File 对象 |
-| text | 结果包含 File 对象,以及文件的文本内容 |
+| 值 | 描述 |
+| ------- | ---------------------------------------------- |
+| file | 结果仅包含 File 对象 |
+| text | 结果包含 File 对象,以及文件的文本内容 |
| dataUrl | 结果包含 File 对象,以及文件对应的 base64 编码 |
### 方法
@@ -237,6 +233,6 @@ before-read、after-read、before-delete 执行时会传递以下回调参数:
通过 ref 可以获取到 Uploader 实例并调用实例方法,详见[组件实例方法](#/zh-CN/quickstart#zu-jian-shi-li-fang-fa)
| 方法名 | 说明 | 参数 | 返回值 |
-|------|------|------|------|
+| --- | --- | --- | --- |
| closeImagePreview | 关闭全屏的图片预览 | - | - |
| chooseFile `v2.5.6` | 主动调起文件选择,由于浏览器安全限制,只有在用户触发操作的上下文中调用才有效 | - | - |