mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-10-27 01:32:10 +08:00 
			
		
		
		
	docs: fix typo in v2 document (#9865)
This commit is contained in:
		
							parent
							
								
									91e243816e
								
							
						
					
					
						commit
						e23b267580
					
				| @ -231,7 +231,7 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/). | |||||||
| 
 | 
 | ||||||
| **Bug Fixes** | **Bug Fixes** | ||||||
| 
 | 
 | ||||||
| - Field: should not reset validation after blured [#8412](https://github.com/youzan/vant/issues/8412) | - Field: should not reset validation after blurred [#8412](https://github.com/youzan/vant/issues/8412) | ||||||
| - Tabs: fix incorrect horizontal slip judgment [#8387](https://github.com/youzan/vant/issues/8387) | - Tabs: fix incorrect horizontal slip judgment [#8387](https://github.com/youzan/vant/issues/8387) | ||||||
| 
 | 
 | ||||||
| ### [v2.12.10](https://github.com/youzan/vant/compare/v2.12.9...v2.12.10) | ### [v2.12.10](https://github.com/youzan/vant/compare/v2.12.9...v2.12.10) | ||||||
|  | |||||||
| @ -105,12 +105,12 @@ export default { | |||||||
| 
 | 
 | ||||||
| ### Slots | ### Slots | ||||||
| 
 | 
 | ||||||
| | Name                 | Description                       | SlotProps | | | Name                 | Description                      | SlotProps | | ||||||
| | -------------------- | --------------------------------- | --------- | | | -------------------- | -------------------------------- | --------- | | ||||||
| | default              | Custom content after list         | -         | | | default              | Custom content after list        | -         | | ||||||
| | top                  | Custom content before list        | -         | | | top                  | Custom content before list       | -         | | ||||||
| | item-bottom `v2.5.0` | Custom content after list item    | item      | | | item-bottom `v2.5.0` | Custom content after list item   | item      | | ||||||
| | tag `v2.12.9`        | Custom tag conetent for list item | item      | | | tag `v2.12.9`        | Custom tag content for list item | item      | | ||||||
| 
 | 
 | ||||||
| ### Less Variables | ### Less Variables | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ Vue.use(Area); | |||||||
| 
 | 
 | ||||||
| ### Basic Usage | ### Basic Usage | ||||||
| 
 | 
 | ||||||
| To initailize `Area` component, `area-list` property is required. | To initialize `Area` component, `area-list` property is required. | ||||||
| 
 | 
 | ||||||
| ```html | ```html | ||||||
| <van-area title="Title" :area-list="areaList" /> | <van-area title="Title" :area-list="areaList" /> | ||||||
|  | |||||||
| @ -38,8 +38,8 @@ Vue.use(Button); | |||||||
| ### Disabled | ### Disabled | ||||||
| 
 | 
 | ||||||
| ```html | ```html | ||||||
| <van-button disabled type="primary">Diabled</van-button> | <van-button disabled type="primary">Disabled</van-button> | ||||||
| <van-button disabled type="info">Diabled</van-button> | <van-button disabled type="info">Disabled</van-button> | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| ### Loading | ### Loading | ||||||
|  | |||||||
| @ -266,7 +266,7 @@ Following props are supported when the type is range | |||||||
| 
 | 
 | ||||||
| | Attribute | Description | Type | Default | | | Attribute | Description | Type | Default | | ||||||
| | --- | --- | --- | --- | | | --- | --- | --- | --- | | ||||||
| | max-range | Number of selectable days | _number \| string_ | Unlimitied | | | max-range | Number of selectable days | _number \| string_ | Unlimited | | ||||||
| | range-prompt | Error message when exceeded max range | _string_ | `Choose no more than xx days` | | | range-prompt | Error message when exceeded max range | _string_ | `Choose no more than xx days` | | ||||||
| | allow-same-day `v2.5.6` | Whether the start and end time of the range is allowed on the same day | _boolean_ | `false` | | | allow-same-day `v2.5.6` | Whether the start and end time of the range is allowed on the same day | _boolean_ | `false` | | ||||||
| 
 | 
 | ||||||
| @ -276,7 +276,7 @@ Following props are supported when the type is multiple | |||||||
| 
 | 
 | ||||||
| | Attribute | Description | Type | Default | | | Attribute | Description | Type | Default | | ||||||
| | --- | --- | --- | --- | | | --- | --- | --- | --- | | ||||||
| | max-range `v2.7.2` | Max count of selectable days | _number \| string_ | Unlimitied | | | max-range `v2.7.2` | Max count of selectable days | _number \| string_ | Unlimited | | ||||||
| | range-prompt | Error message when exceeded max count | _string_ | `Choose no more than xx days` | | | range-prompt | Error message when exceeded max count | _string_ | `Choose no more than xx days` | | ||||||
| 
 | 
 | ||||||
| ### Data Structure of Day | ### Data Structure of Day | ||||||
|  | |||||||
| @ -58,7 +58,7 @@ export default { | |||||||
| 
 | 
 | ||||||
| ### Disabled | ### Disabled | ||||||
| 
 | 
 | ||||||
| Use the `disabled` prop to disable CollaseItem. | Use the `disabled` prop to disable CollapseItem. | ||||||
| 
 | 
 | ||||||
| ```html | ```html | ||||||
| <van-collapse v-model="activeNames"> | <van-collapse v-model="activeNames"> | ||||||
|  | |||||||
| @ -69,7 +69,7 @@ Use the image prop to display different placeholder images. | |||||||
| | --- | --- | --- | --- | | | --- | --- | --- | --- | | ||||||
| | image | Image type,can be set to `error` `network` `search` or image URL | _string_ | `default` | | | image | Image type,can be set to `error` `network` `search` or image URL | _string_ | `default` | | ||||||
| | image-size `v2.10.11` | Image size | _number \| string_ | - | | | image-size `v2.10.11` | Image size | _number \| string_ | - | | ||||||
| | description | Desciption | _string_ | - | | | description | Description | _string_ | - | | ||||||
| 
 | 
 | ||||||
| ### Slots | ### Slots | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -129,7 +129,7 @@ export default { | |||||||
| | closeable `v2.5.0` | Whether to show close icon | _boolean_ | `false` | | | closeable `v2.5.0` | Whether to show close icon | _boolean_ | `false` | | ||||||
| | closeIcon `v2.5.0` | Close icon name | _string_ | `clear` | | | closeIcon `v2.5.0` | Close icon name | _string_ | `clear` | | ||||||
| | closeIconPosition `v2.5.0` | Close icon position,can be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` | | | closeIconPosition `v2.5.0` | Close icon position,can be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` | | ||||||
| | transition `v2.12.8` | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` | | | transition `v2.12.8` | Transition, equivalent to `name` prop of [transition](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` | | ||||||
| | getContainer | Return the mount node for ImagePreview | _string \| () => Element_ | - | | | getContainer | Return the mount node for ImagePreview | _string \| () => Element_ | - | | ||||||
| 
 | 
 | ||||||
| ### Props | ### Props | ||||||
| @ -150,7 +150,7 @@ export default { | |||||||
| | closeable `v2.5.0` | Whether to show close icon | _boolean_ | `false` | | | closeable `v2.5.0` | Whether to show close icon | _boolean_ | `false` | | ||||||
| | close-icon `v2.5.0` | Close icon name | _string_ | `clear` | | | close-icon `v2.5.0` | Close icon name | _string_ | `clear` | | ||||||
| | close-icon-position `v2.5.0` | Close icon position,can be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` | | | close-icon-position `v2.5.0` | Close icon position,can be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` | | ||||||
| | transition `v2.12.8` | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` | | | transition `v2.12.8` | Transition, equivalent to `name` prop of [transition](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` | | ||||||
| | get-container | Return the mount node for ImagePreview | _string \| () => Element_ | - | | | get-container | Return the mount node for ImagePreview | _string \| () => Element_ | - | | ||||||
| 
 | 
 | ||||||
| ### Events | ### Events | ||||||
| @ -177,14 +177,14 @@ Use [ref](https://vuejs.org/v2/api/#ref) to get ImagePreview instance and call i | |||||||
| | index | Custom index | { index: index of current image } | | | index | Custom index | { index: index of current image } | | ||||||
| | cover | Custom content that covers the image preview | - | | | cover | Custom content that covers the image preview | - | | ||||||
| 
 | 
 | ||||||
| ### onClose Parematers | ### onClose Parameters | ||||||
| 
 | 
 | ||||||
| | Attribute | Description            | Type     | | | Attribute | Description            | Type     | | ||||||
| | --------- | ---------------------- | -------- | | | --------- | ---------------------- | -------- | | ||||||
| | url       | Url of current image   | _number_ | | | url       | Url of current image   | _number_ | | ||||||
| | index     | Index of current image | _number_ | | | index     | Index of current image | _number_ | | ||||||
| 
 | 
 | ||||||
| ### onScale Parematers | ### onScale Parameters | ||||||
| 
 | 
 | ||||||
| | Attribute | Description            | Type     | | | Attribute | Description            | Type     | | ||||||
| | --------- | ---------------------- | -------- | | | --------- | ---------------------- | -------- | | ||||||
|  | |||||||
| @ -165,7 +165,7 @@ export default { | |||||||
| | closeable `v2.5.0` | 是否显示关闭图标 | _boolean_ | `false` | | | closeable `v2.5.0` | 是否显示关闭图标 | _boolean_ | `false` | | ||||||
| | closeIcon `v2.5.0` | 关闭图标名称或图片链接 | _string_ | `clear` | | | closeIcon `v2.5.0` | 关闭图标名称或图片链接 | _string_ | `clear` | | ||||||
| | closeIconPosition `v2.5.0` | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` | | | closeIconPosition `v2.5.0` | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` | | ||||||
| | transition `v2.12.8` | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的 `name` 属性 | _string_ | `van-fade` | | | transition `v2.12.8` | 动画类名,等价于 [transition](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_ | - | | | getContainer | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | - | | ||||||
| 
 | 
 | ||||||
| ### Props | ### Props | ||||||
| @ -188,7 +188,7 @@ export default { | |||||||
| | closeable `v2.5.0` | 是否显示关闭图标 | _boolean_ | `false` | | | closeable `v2.5.0` | 是否显示关闭图标 | _boolean_ | `false` | | ||||||
| | close-icon `v2.5.0` | 关闭图标名称或图片链接 | _string_ | `clear` | | | close-icon `v2.5.0` | 关闭图标名称或图片链接 | _string_ | `clear` | | ||||||
| | close-icon-position `v2.5.0` | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` | | | close-icon-position `v2.5.0` | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` | | ||||||
| | transition `v2.12.8` | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的 `name` 属性 | _string_ | `van-fade` | | | transition `v2.12.8` | 动画类名,等价于 [transition](https://cn.vuejs.org/v2/api/index.html#transition) 的 `name` 属性 | _string_ | `van-fade` | | ||||||
| | get-container | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | - | | | get-container | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | - | | ||||||
| 
 | 
 | ||||||
| ### Events | ### Events | ||||||
|  | |||||||
| @ -85,7 +85,7 @@ Vue.use(Lazyload); | |||||||
| 
 | 
 | ||||||
| ### fit optional value | ### fit optional value | ||||||
| 
 | 
 | ||||||
| | name | desctription | | | name | description | | ||||||
| | --- | --- | | | --- | --- | | ||||||
| | contain | Keep aspect ratio, fully display the long side of the image | | | contain | Keep aspect ratio, fully display the long side of the image | | ||||||
| | cover | Keep aspect ratio, fully display the short side of the image, cutting the long side | | | cover | Keep aspect ratio, fully display the short side of the image, cutting the long side | | ||||||
|  | |||||||
| @ -61,7 +61,7 @@ export default { | |||||||
| | left-arrow | Whether to show left arrow | _boolean_ | `false` | | | left-arrow | Whether to show left arrow | _boolean_ | `false` | | ||||||
| | border | Whether to show bottom border | _boolean_ | `true` | | | border | Whether to show bottom border | _boolean_ | `true` | | ||||||
| | fixed | Whether to fixed top | _boolean_ | `false` | | | fixed | Whether to fixed top | _boolean_ | `false` | | ||||||
| | placeholder `v2.5.9` | Whether to generage a placeholder element when fixed | _boolean_ | `false` | | | placeholder `v2.5.9` | Whether to generate a placeholder element when fixed | _boolean_ | `false` | | ||||||
| | z-index | Z-index | _number \| string_ | `1` | | | z-index | Z-index | _number \| string_ | `1` | | ||||||
| | safe-area-inset-top `v2.10.13` | Whether to enable top safe area adaptation | _boolean_ | `false` | | | safe-area-inset-top `v2.10.13` | Whether to enable top safe area adaptation | _boolean_ | `false` | | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -187,7 +187,7 @@ export default { | |||||||
| | input | Emitted when keydown | key: Content of the key | | | input | Emitted when keydown | key: Content of the key | | ||||||
| | delete | Emitted when the delete key is pressed | - | | | delete | Emitted when the delete key is pressed | - | | ||||||
| | close | Emitted when the close button is clicked | - | | | close | Emitted when the close button is clicked | - | | ||||||
| | blur | Emitted when the close button is clicked or the keyboard is blured | - | | | blur | Emitted when the close button is clicked or the keyboard is blurred | - | | ||||||
| | show | Emitted when keyboard is fully displayed | - | | | show | Emitted when keyboard is fully displayed | - | | ||||||
| | hide | Emitted when keyboard is fully hidden | - | | | hide | Emitted when keyboard is fully hidden | - | | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -50,7 +50,7 @@ test('click close button', () => { | |||||||
|   expect(wrapper.emitted('close')).toBeTruthy(); |   expect(wrapper.emitted('close')).toBeTruthy(); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| test('listen to show/hide event when has transtion', () => { | test('listen to show/hide event when has transition', () => { | ||||||
|   const wrapper = mount(NumberKeyboard); |   const wrapper = mount(NumberKeyboard); | ||||||
|   wrapper.vm.show = true; |   wrapper.vm.show = true; | ||||||
|   wrapper.trigger('animationend'); |   wrapper.trigger('animationend'); | ||||||
| @ -60,7 +60,7 @@ test('listen to show/hide event when has transtion', () => { | |||||||
|   expect(wrapper.emitted('hide')).toBeTruthy(); |   expect(wrapper.emitted('hide')).toBeTruthy(); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| test('listen to show event when no transtion', () => { | test('listen to show event when no transition', () => { | ||||||
|   const wrapper = mount(NumberKeyboard, { |   const wrapper = mount(NumberKeyboard, { | ||||||
|     propsData: { |     propsData: { | ||||||
|       transition: false, |       transition: false, | ||||||
|  | |||||||
| @ -122,7 +122,7 @@ export default { | |||||||
| | closeable | Whether to show close icon | _boolean_ | `false` | | | closeable | Whether to show close icon | _boolean_ | `false` | | ||||||
| | close-icon | Close icon name | _string_ | `cross` | | | close-icon | Close icon name | _string_ | `cross` | | ||||||
| | close-icon-position | Close Icon Position,can be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` | | | close-icon-position | Close Icon Position,can be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` | | ||||||
| | transition | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | - | | | transition | Transition, equivalent to `name` prop of [transition](https://vuejs.org/v2/api/#transition) | _string_ | - | | ||||||
| | transition-appear `v2.10.14` | Whether to apply transition on initial render | _boolean_ | `false` | | | transition-appear `v2.10.14` | Whether to apply transition on initial render | _boolean_ | `false` | | ||||||
| | get-container | Return the mount node for Popup | _string \| () => Element_ | - | | | get-container | Return the mount node for Popup | _string \| () => Element_ | - | | ||||||
| | safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `false` | | | safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `false` | | ||||||
|  | |||||||
| @ -133,7 +133,7 @@ export default { | |||||||
| | closeable | 是否显示关闭图标 | _boolean_ | `false` | | | closeable | 是否显示关闭图标 | _boolean_ | `false` | | ||||||
| | close-icon | 关闭图标名称或图片链接 | _string_ | `cross` | | | close-icon | 关闭图标名称或图片链接 | _string_ | `cross` | | ||||||
| | close-icon-position | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` | | | close-icon-position | 关闭图标位置,可选值为`top-left`<br>`bottom-left` `bottom-right` | _string_ | `top-right` | | ||||||
| | transition | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | - | | | transition | 动画类名,等价于 [transition](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | - | | ||||||
| | transition-appear `v2.10.14` | 是否在初始渲染时启用过渡动画 | _boolean_ | `false` | | | transition-appear `v2.10.14` | 是否在初始渲染时启用过渡动画 | _boolean_ | `false` | | ||||||
| | get-container | 指定挂载的节点 | _string \| () => Element_ | - | | | get-container | 指定挂载的节点 | _string \| () => Element_ | - | | ||||||
| | safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei) | _boolean_ | `false` | | | safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei) | _boolean_ | `false` | | ||||||
|  | |||||||
| @ -136,7 +136,7 @@ Use `action` slot to custom right button, `cancel` event will no longer be Emitt | |||||||
| | search | Emitted when confirming search            | _value: string_ | | | search | Emitted when confirming search            | _value: string_ | | ||||||
| | input  | Emitted when input value changed          | _value: string_ | | | input  | Emitted when input value changed          | _value: string_ | | ||||||
| | focus  | Emitted when input is focused             | _event: Event_  | | | focus  | Emitted when input is focused             | _event: Event_  | | ||||||
| | blur   | Emitted when input is blured              | _event: Event_  | | | blur   | Emitted when input is blurred             | _event: Event_  | | ||||||
| | clear  | Emitted when the clear icon is clicked    | _event: Event_  | | | clear  | Emitted when the clear icon is clicked    | _event: Event_  | | ||||||
| | cancel | Emitted when the cancel button is clicked | -               | | | cancel | Emitted when the cancel button is clicked | -               | | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -328,7 +328,7 @@ customStepperConfig: { | |||||||
|   handleStepperChange: currentValue => {}, |   handleStepperChange: currentValue => {}, | ||||||
|   // stock |   // stock | ||||||
|   stockNum: 1999, |   stockNum: 1999, | ||||||
|   // stock fomatter |   // stock formatter | ||||||
|   stockFormatter: stockNum => {}, |   stockFormatter: stockNum => {}, | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
|  | |||||||
| @ -142,7 +142,7 @@ export default { | |||||||
| | plus | Emitted when the plus button is clicked | - | | | plus | Emitted when the plus button is clicked | - | | ||||||
| | minus | Emitted when the minus button is clicked | - | | | minus | Emitted when the minus button is clicked | - | | ||||||
| | focus | Emitted when the input is focused | _event: Event_ | | | focus | Emitted when the input is focused | _event: Event_ | | ||||||
| | blur | Emitted when the input is blured | _event: Event_ | | | blur | Emitted when the input is blurred | _event: Event_ | | ||||||
| 
 | 
 | ||||||
| ### Less Variables | ### Less Variables | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -19,7 +19,7 @@ Vue.use(SubmitBar); | |||||||
| 
 | 
 | ||||||
| ### Disabled | ### Disabled | ||||||
| 
 | 
 | ||||||
| `submit` event will not triggerd when disabled. | `submit` event will not triggered when disabled. | ||||||
| 
 | 
 | ||||||
| ```html | ```html | ||||||
| <van-submit-bar | <van-submit-bar | ||||||
| @ -34,7 +34,7 @@ Vue.use(SubmitBar); | |||||||
| 
 | 
 | ||||||
| ### Loading | ### Loading | ||||||
| 
 | 
 | ||||||
| `submit` event will not triggerd when loading. | `submit` event will not triggered when loading. | ||||||
| 
 | 
 | ||||||
| ```html | ```html | ||||||
| <van-submit-bar loading :price="3050" button-text="Submit" @submit="onSubmit" /> | <van-submit-bar loading :price="3050" button-text="Submit" @submit="onSubmit" /> | ||||||
|  | |||||||
| @ -117,17 +117,17 @@ export default { | |||||||
| 
 | 
 | ||||||
| | Event | Description | Arguments | | | Event | Description | Arguments | | ||||||
| | --- | --- | --- | | | --- | --- | --- | | ||||||
| | click | Emitted when SwipeCell is clicked | Click positon (`left` `right` `cell` `outside`) | | | click | Emitted when SwipeCell is clicked | Click position (`left` `right` `cell` `outside`) | | ||||||
| | open | Emitted when SwipeCell is opened | { position: 'left' \| 'right' , name: string } | | | open | Emitted when SwipeCell is opened | { position: 'left' \| 'right' , name: string } | | ||||||
| | close | Emitted when SwipeCell is closed | { position: string , name: string } | | | close | Emitted when SwipeCell is closed | { position: string , name: string } | | ||||||
| 
 | 
 | ||||||
| ### beforeClose Params | ### beforeClose Params | ||||||
| 
 | 
 | ||||||
| | Attribute | Description                                     | Type        | | | Attribute | Description                                      | Type        | | ||||||
| | --------- | ----------------------------------------------- | ----------- | | | --------- | ------------------------------------------------ | ----------- | | ||||||
| | name      | Name                                            | _string_    | | | name      | Name                                             | _string_    | | ||||||
| | position  | Click positon (`left` `right` `cell` `outside`) | _string_    | | | position  | Click position (`left` `right` `cell` `outside`) | _string_    | | ||||||
| | instance  | SwipeCell instance                              | _SwipeCell_ | | | instance  | SwipeCell instance                               | _SwipeCell_ | | ||||||
| 
 | 
 | ||||||
| ### Methods | ### Methods | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -163,7 +163,7 @@ Use `animated` props to change tabs with animation. | |||||||
| 
 | 
 | ||||||
| ### Swipeable | ### Swipeable | ||||||
| 
 | 
 | ||||||
| In swipeable mode, you can switch tabs with swipe gestrue in the content. | In swipeable mode, you can switch tabs with swipe gesture in the content. | ||||||
| 
 | 
 | ||||||
| ```html | ```html | ||||||
| <van-tabs v-model="active" swipeable> | <van-tabs v-model="active" swipeable> | ||||||
| @ -230,7 +230,7 @@ export default { | |||||||
| | border | Whether to show border when `type="line"` | _boolean_ | `false` | | | border | Whether to show border when `type="line"` | _boolean_ | `false` | | ||||||
| | ellipsis | Whether to ellipsis too long title | _boolean_ | `true` | | | ellipsis | Whether to ellipsis too long title | _boolean_ | `true` | | ||||||
| | sticky | Whether to use sticky mode | _boolean_ | `false` | | | sticky | Whether to use sticky mode | _boolean_ | `false` | | ||||||
| | swipeable | Whether to switch tabs with swipe gestrue in the content | _boolean_ | `false` | | | swipeable | Whether to switch tabs with swipe gesture in the content | _boolean_ | `false` | | ||||||
| | lazy-render | Whether to enable tab content lazy render | _boolean_ | `true` | | | lazy-render | Whether to enable tab content lazy render | _boolean_ | `true` | | ||||||
| | scrollspy | Whether to use scrollspy mode | _boolean_ | `false` | | | scrollspy | Whether to use scrollspy mode | _boolean_ | `false` | | ||||||
| | offset-top `v2.8.7` | Sticky offset top , supports `px` `vw` `vh` `rem` unit, default `px` | _number \| string_ | `0` | | | offset-top `v2.8.7` | Sticky offset top , supports `px` `vw` `vh` `rem` unit, default `px` | _number \| string_ | `0` | | ||||||
|  | |||||||
| @ -154,7 +154,7 @@ export default { | |||||||
| | active-color | Color of active tab item | _string_ | `#1989fa` | | | active-color | Color of active tab item | _string_ | `#1989fa` | | ||||||
| | inactive-color | Color of inactive tab item | _string_ | `#7d7e80` | | | inactive-color | Color of inactive tab item | _string_ | `#7d7e80` | | ||||||
| | route | Whether to enable route mode | _boolean_ | `false` | | | route | Whether to enable route mode | _boolean_ | `false` | | ||||||
| | placeholder `v2.6.0` | Whether to generage a placeholder element when fixed | _boolean_ | `false` | | | placeholder `v2.6.0` | Whether to generate a placeholder element when fixed | _boolean_ | `false` | | ||||||
| | safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `false` | | | safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `false` | | ||||||
| | before-change `v2.10.4` | Callback function before changing tabs,return `false` to prevent change,support return Promise | _(name) => boolean \| Promise_ | - | | | before-change `v2.10.4` | Callback function before changing tabs,return `false` to prevent change,support return Promise | _(name) => boolean \| Promise_ | - | | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -144,7 +144,7 @@ Toast.resetDefaultOptions('loading'); | |||||||
| | Toast.success | `options | message` | toast instance | Show success toast | | | Toast.success | `options | message` | toast instance | Show success toast | | ||||||
| | Toast.fail | `options | message` | toast instance | Show fail toast | | | Toast.fail | `options | message` | toast instance | Show fail toast | | ||||||
| | Toast.clear | `clearAll: boolean` | `void` | Close toast | | | Toast.clear | `clearAll: boolean` | `void` | Close toast | | ||||||
| | Toast.allowMultiple | - | `void` | Allow multlple toast at the same time | | | Toast.allowMultiple | - | `void` | Allow multiple toast at the same time | | ||||||
| | Toast.setDefaultOptions | `type | options` | `void` | Set default options of all toasts | | | Toast.setDefaultOptions | `type | options` | `void` | Set default options of all toasts | | ||||||
| | Toast.resetDefaultOptions | `type` | `void` | Reset default options of all toasts | | | Toast.resetDefaultOptions | `type` | `void` | Reset default options of all toasts | | ||||||
| 
 | 
 | ||||||
| @ -166,7 +166,7 @@ Toast.resetDefaultOptions('loading'); | |||||||
| | className | Custom className | _any_ | - | | | className | Custom className | _any_ | - | | ||||||
| | onOpened | Callback function after opened | _Function_ | - | | | onOpened | Callback function after opened | _Function_ | - | | ||||||
| | onClose | Callback function after close | _Function_ | - | | | onClose | Callback function after close | _Function_ | - | | ||||||
| | transition | Transition, equivalent to `name` prop of [transtion](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` | | | transition | Transition, equivalent to `name` prop of [transition](https://vuejs.org/v2/api/#transition) | _string_ | `van-fade` | | ||||||
| | getContainer | Return the mount node for Toast | _string \| () => Element_ | `body` | | | getContainer | Return the mount node for Toast | _string \| () => Element_ | `body` | | ||||||
| 
 | 
 | ||||||
| ### Less Variables | ### Less Variables | ||||||
|  | |||||||
| @ -181,7 +181,7 @@ Toast.resetDefaultOptions('loading'); | |||||||
| | className | 自定义类名 | _any_ | - | | | className | 自定义类名 | _any_ | - | | ||||||
| | onOpened | 完全展示后的回调函数 | _Function_ | - | | | onOpened | 完全展示后的回调函数 | _Function_ | - | | ||||||
| | onClose | 关闭时的回调函数 | _Function_ | - | | | onClose | 关闭时的回调函数 | _Function_ | - | | ||||||
| | transition | 动画类名,等价于 [transtion](https://cn.vuejs.org/v2/api/index.html#transition) 的`name`属性 | _string_ | `van-fade` | | | transition | 动画类名,等价于 [transition](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` | | | getContainer | 指定挂载的节点,[用法示例](#/zh-CN/popup#zhi-ding-gua-zai-wei-zhi) | _string \| () => Element_ | `body` | | ||||||
| 
 | 
 | ||||||
| ### 样式变量 | ### 样式变量 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user