mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] Picker: update document and fix snapshot
This commit is contained in:
parent
04b88583c2
commit
3a4b434b4c
@ -6,6 +6,18 @@
|
|||||||
|
|
||||||
- 新增`input`插槽
|
- 新增`input`插槽
|
||||||
|
|
||||||
|
##### Image
|
||||||
|
|
||||||
|
- 修复懒加载模式下无法展示加载状态和错误状态的问题
|
||||||
|
|
||||||
|
##### List
|
||||||
|
|
||||||
|
- 优化滚动判断逻辑
|
||||||
|
|
||||||
|
##### Toolbar
|
||||||
|
|
||||||
|
- 新增`toolbar-position`属性
|
||||||
|
|
||||||
|
|
||||||
### [v2.0.0-beta.4](https://github.com/youzan/vant/tree/v2.0.0-beta.4)
|
### [v2.0.0-beta.4](https://github.com/youzan/vant/tree/v2.0.0-beta.4)
|
||||||
`2019-06-05`
|
`2019-06-05`
|
||||||
|
@ -51,6 +51,7 @@ exports[`create a AddressEdit 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size:100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size:100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height:44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height:44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -121,6 +122,7 @@ exports[`create a AddressEdit with props 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size:100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size:100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height:44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height:44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,6 +77,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -159,6 +160,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -217,6 +219,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,6 +29,7 @@ exports[`change option 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -61,6 +62,7 @@ exports[`change option 2`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -93,6 +95,7 @@ exports[`change option 3`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -119,6 +122,7 @@ exports[`columns-num prop 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -150,6 +154,7 @@ exports[`reset method 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -182,6 +187,7 @@ exports[`reset method 2`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -214,6 +220,7 @@ exports[`watch areaList & code 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -246,6 +253,7 @@ exports[`watch areaList & code 2`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -278,5 +286,6 @@ exports[`watch areaList & code 3`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@ -162,6 +162,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -242,6 +243,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -287,6 +289,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -379,6 +382,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -436,6 +440,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -187,6 +187,7 @@ When Picker columns data is acquired asynchronously, use `loading` prop to show
|
|||||||
|------|------|------|------|
|
|------|------|------|------|
|
||||||
| columns | Columns data | `Array` | `[]` |
|
| columns | Columns data | `Array` | `[]` |
|
||||||
| show-toolbar | Whether to show toolbar | `Boolean` | `false` |
|
| show-toolbar | Whether to show toolbar | `Boolean` | `false` |
|
||||||
|
| toolbar-position | Toolbar position, cat be set to `bottom` | `String` | `top` |
|
||||||
| title | Toolbar title | `String` | `''` |
|
| title | Toolbar title | `String` | `''` |
|
||||||
| loading | Whether to show loading prompt | `Boolean` | `false` |
|
| loading | Whether to show loading prompt | `Boolean` | `false` |
|
||||||
| value-key | Key of option text | `String` | `text` |
|
| value-key | Key of option text | `String` | `text` |
|
||||||
|
@ -18,6 +18,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -36,6 +37,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -59,6 +61,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -84,6 +87,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -108,6 +112,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -132,6 +137,7 @@ exports[`renders demo correctly 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,5 +38,6 @@ exports[`render title slot 1`] = `
|
|||||||
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
<div class="van-picker__mask" style="background-size: 100% 88px;"></div>
|
||||||
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
<div class="van-hairline--top-bottom van-picker__frame" style="height: 44px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!---->
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@ -195,6 +195,7 @@ export default {
|
|||||||
|------|------|------|------|------|
|
|------|------|------|------|------|
|
||||||
| columns | 对象数组,配置每一列显示的数据 | `Array` | `[]` | - |
|
| columns | 对象数组,配置每一列显示的数据 | `Array` | `[]` | - |
|
||||||
| show-toolbar | 是否显示顶部栏 | `Boolean` | `false` | - |
|
| show-toolbar | 是否显示顶部栏 | `Boolean` | `false` | - |
|
||||||
|
| toolbar-position | 顶部栏位置,可选值为`bottom` | `String` | `top` | 2.0.0 |
|
||||||
| title | 顶部栏标题 | `String` | `''` | - |
|
| title | 顶部栏标题 | `String` | `''` | - |
|
||||||
| loading | 是否显示加载状态 | `Boolean` | `false` | - |
|
| loading | 是否显示加载状态 | `Boolean` | `false` | - |
|
||||||
| value-key | 选项对象中,文字对应的 key | `String` | `text` | - |
|
| value-key | 选项对象中,文字对应的 key | `String` | `text` | - |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user