[Doc] detailed Array typing

This commit is contained in:
陈嘉涵 2019-07-11 20:44:51 +08:00
parent 019c75506a
commit 2c4adff307
34 changed files with 67 additions and 66 deletions

View File

@ -93,7 +93,7 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| actions | Options | `Array` | `[]` | | actions | Options | `Action[]` | `[]` |
| title | Title | `string` | - | | title | Title | `string` | - |
| cancel-text | Text of cancel button | `string` | - | | cancel-text | Text of cancel button | `string` | - |
| overlay | Whether to show overlay | `boolean` | `true` | | overlay | Whether to show overlay | `boolean` | `true` |
@ -117,7 +117,7 @@ export default {
| close | Triggered when close ActionSheet | - | | close | Triggered when close ActionSheet | - |
| closed | Triggered when closed ActionSheet | - | | closed | Triggered when closed ActionSheet | - |
### Data struct of actions ### Data struct of Action
| key | Description | | key | Description |
|------|------| |------|------|

View File

@ -100,7 +100,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| actions | 菜单选项 | `Array` | `[]` | - | | actions | 菜单选项 | `Action[]` | `[]` | - |
| title | 标题 | `string` | - | - | | title | 标题 | `string` | - | - |
| cancel-text | 取消按钮文字 | `string` | - | - | | cancel-text | 取消按钮文字 | `string` | - | - |
| overlay | 是否显示遮罩层 | `boolean` | `true` | - | | overlay | 是否显示遮罩层 | `boolean` | `true` | - |
@ -124,7 +124,7 @@ export default {
| close | 关闭菜单时触发 | - | | close | 关闭菜单时触发 | - |
| closed | 关闭菜单且动画结束后触发 | - | | closed | 关闭菜单且动画结束后触发 | - |
### actions ### Action 数据结构
`Props`中的`actions`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key` `Props`中的`actions`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key`

View File

@ -63,8 +63,8 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| area-list | Area List | `object` | - | | area-list | Area List | `object` | - |
| address-info | Address Info | `object` | `{}` | | address-info | Address Info | `AddressInfo` | `{}` |
| search-result | Address search result | `Array` | `[]` | | search-result | Address search result | `SearchResult[]` | `[]` |
| show-postal | Whether to show postal field | `boolean` | `false` | | show-postal | Whether to show postal field | `boolean` | `false` |
| show-delete | Whether to show delete button | `boolean` | `false` | | show-delete | Whether to show delete button | `boolean` | `false` |
| show-set-default | Whether to show default address switch | `boolean` | `false` | | show-set-default | Whether to show default address switch | `boolean` | `false` |
@ -105,7 +105,7 @@ Use ref to get address-edit instance and call instance methods
|------|------|------|------| |------|------|------|------|
| setAddressDetail | addressDetail: string | - | Set address detail | | setAddressDetail | addressDetail: string | - | Set address detail |
### addressInfo Data Structure ### AddressInfo Data Structure
| key | Description | Type | | key | Description | Type |
|------|------|------| |------|------|------|
@ -120,7 +120,7 @@ Use ref to get address-edit instance and call instance methods
| postalCode | Postal code | `string` | | postalCode | Postal code | `string` |
| isDefault | Is default address | `boolean` | | isDefault | Is default address | `boolean` |
### searchResult Data Structure ### SearchResult Data Structure
| key | Description | Type | | key | Description | Type |
|------|------|------| |------|------|------|

View File

@ -62,8 +62,8 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| area-list | 地区列表 | `object` | - | - | | area-list | 地区列表 | `object` | - | - |
| address-info | 收货人信息初始值 | `object` | `{}` | - | | address-info | 收货人信息初始值 | `AddressInfo` | `{}` | - |
| search-result | 详细地址搜索结果 | `Array` | `[]` | - | | search-result | 详细地址搜索结果 | `SearchResult[]` | `[]` | - |
| show-postal | 是否显示邮政编码 | `boolean` | `false` | - | | show-postal | 是否显示邮政编码 | `boolean` | `false` | - |
| show-delete | 是否显示删除按钮 | `boolean` | `false` | - | | show-delete | 是否显示删除按钮 | `boolean` | `false` | - |
| show-set-default | 是否显示默认地址栏 | `boolean` | `false` | - | | show-set-default | 是否显示默认地址栏 | `boolean` | `false` | - |
@ -104,9 +104,9 @@ export default {
|------|------|------|------| |------|------|------|------|
| setAddressDetail | addressDetail: string | - | 设置详细地址 | | setAddressDetail | addressDetail: string | - | 设置详细地址 |
### addressInfo 数据格式 ### AddressInfo 数据格式
注意:addressInfo 仅作为初始值传入,表单最终内容可以在 save 事件中获取 注意:AddressInfo 仅作为初始值传入,表单最终内容可以在 save 事件中获取
| key | 说明 | 类型 | | key | 说明 | 类型 |
|------|------|------| |------|------|------|
@ -121,7 +121,7 @@ export default {
| postalCode | 邮政编码 | `string` | | postalCode | 邮政编码 | `string` |
| isDefault | 是否为默认地址 | `boolean` | | isDefault | 是否为默认地址 | `boolean` |
### searchResult 数据格式 ### SearchResult 数据格式
| key | 说明 | 类型 | | key | 说明 | 类型 |
|------|------|------| |------|------|------|

View File

@ -69,12 +69,12 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| v-model | Id of chosen address | string | - | | v-model | Id of chosen address | `string` | - |
| list | Address list | Array | `[]` | | list | Address list | `Address[]` | `[]` |
| disabled-list | Disabled address list | `Array` | `[]` | | disabled-list | Disabled address list | `Address[]` | `[]` |
| disabled-text | Disabled text | `string` | - | | disabled-text | Disabled text | `string` | - |
| switchable | Whether to allow switch address | `boolean` | `true` | | switchable | Whether to allow switch address | `boolean` | `true` |
| add-button-text | Add button text | string | `Add new address` | | add-button-text | Add button text | `string` | `Add new address` |
### Events ### Events

View File

@ -71,11 +71,11 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| v-model | 当前选中地址的 id | `string` | - | - | | v-model | 当前选中地址的 id | `string` | - | - |
| list | 地址列表 | `Array` | `[]` | - | | list | 地址列表 | `Address[]` | `[]` | - |
| add-button-text | 底部按钮文字 | `string` | `新增地址` | - | | disabled-list | 不可配送地址列表 | `Address[]` | `[]` | - |
| disabled-list | 不可配送地址列表 | `Array` | `[]` | - |
| disabled-text | 不可配送提示文案 | `string` | - | - | | disabled-text | 不可配送提示文案 | `string` | - | - |
| switchable | 是否允许切换地址 | `boolean` | `true` | - | | switchable | 是否允许切换地址 | `boolean` | `true` | - |
| add-button-text | 底部按钮文字 | `string` | `新增地址` | - |
### Events ### Events
@ -87,7 +87,7 @@ export default {
| edit-disabled | 编辑不可配送的地址时触发 | item: 地址对象index: 索引 | | edit-disabled | 编辑不可配送的地址时触发 | item: 地址对象index: 索引 |
| select-disabled | 选中不可配送的地址时触发 | item: 地址对象index: 索引 | | select-disabled | 选中不可配送的地址时触发 | item: 地址对象index: 索引 |
### 地址列表字段说明 ### Address 数据结构
| key | 说明 | 类型 | | key | 说明 | 类型 |
|------|------|------| |------|------|------|

View File

@ -156,7 +156,7 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| v-model | Names of all checked checkboxes | `Array` | - | | v-model | Names of all checked checkboxes | `any[]` | - |
| disabled | Disable all checkboxes | `boolean` | `false` | | disabled | Disable all checkboxes | `boolean` | `false` |
| max | Maximum amount of checked options | `number` | `0`(Unlimited) | | max | Maximum amount of checked options | `number` | `0`(Unlimited) |

View File

@ -160,7 +160,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| v-model | 所有选中项的标识符 | `Array` | - | - | | v-model | 所有选中项的标识符 | `any[]` | - | - |
| disabled | 是否禁用所有复选框 | `boolean` | `false` | - | | disabled | 是否禁用所有复选框 | `boolean` | `false` | - |
| max | 设置最大可选数0 为无限制 | `number` | `0` | - | | max | 设置最大可选数0 为无限制 | `number` | `0` | - |

View File

@ -77,7 +77,7 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| v-model | names of current active panels | `Array | string | number` | - | | v-model | Names of current active panels | `string[] | number[] | string | number` | - |
| accordion | Whether to be accordion mode | `boolean` | `false` | | accordion | Whether to be accordion mode | `boolean` | `false` |
| border | Whether to show outer border | `boolean` | `true` | | border | Whether to show outer border | `boolean` | `true` |

View File

@ -78,7 +78,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| v-model | 当前展开面板的 name | `Array | string | number` | - | - | | v-model | 当前展开面板的 name | `string[] | number[] | string | number` | - | - |
| accordion | 是否开启手风琴模式 | `boolean` | `false` | - | | accordion | 是否开启手风琴模式 | `boolean` | `false` | - |
| border | 是否显示外边框 | `boolean` | `true` | 1.6.9 | | border | 是否显示外边框 | `boolean` | `true` | 1.6.9 |

View File

@ -152,7 +152,7 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------|------| |------|------|------|------|------|
| v-model | Id of chosen contact | `string | number` | - | | v-model | Id of chosen contact | `string | number` | - |
| list | Contact list | `Array` | `[]` | | list | Contact list | `Contact[]` | `[]` |
| add-text | Add button text | `string` | `Add new contact` | | add-text | Add button text | `string` | `Add new contact` |
### ContactList Events ### ContactList Events

View File

@ -156,7 +156,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| v-model | 当前选中联系人的 id | `string | number` | - | - | | v-model | 当前选中联系人的 id | `string | number` | - | - |
| list | 联系人列表 | `Array` | `[]` | - | | list | 联系人列表 | `Contact[]` | `[]` | - |
| add-text | 新建按钮文案 | `string` | `新建联系人` | - | | add-text | 新建按钮文案 | `string` | `新建联系人` | - |
### ContactList Events ### ContactList Events
@ -184,7 +184,7 @@ export default {
| save | 点击保存按钮时触发 | content表单内容 | | save | 点击保存按钮时触发 | content表单内容 |
| delete | 点击删除按钮时触发 | content表单内容 | | delete | 点击删除按钮时触发 | content表单内容 |
### 联系人数据格式 ### Contact 数据结构
| key | 说明 | 类型 | | key | 说明 | 类型 |
|------|------|------| |------|------|------|

View File

@ -74,7 +74,7 @@ export default {
|------|------|------|------| |------|------|------|------|
| title | Cell title | `string` | `Coupon` | | title | Cell title | `string` | `Coupon` |
| chosen-coupon | Index of chosen coupon | `number` | `-1` | | chosen-coupon | Index of chosen coupon | `number` | `-1` |
| coupons | Coupon list | `Array` | `[]` | | coupons | Coupon list | `Coupon[]` | `[]` |
| editable | Cell editable | `boolean` | `true` | | editable | Cell editable | `boolean` | `true` |
| border | Whether to show innner border | `boolean` | `true` | | border | Whether to show innner border | `boolean` | `true` |
| currency | Currency symbol | `string` | `¥` | | currency | Currency symbol | `string` | `¥` |
@ -85,8 +85,8 @@ export default {
|------|------|------|------| |------|------|------|------|
| v-model | Current exchange code | `string` | - | | v-model | Current exchange code | `string` | - |
| chosen-coupon | Index of chosen coupon | `number` | `-1` | | chosen-coupon | Index of chosen coupon | `number` | `-1` |
| coupons | Coupon list | `Array` | `[]` | | coupons | Coupon list | `Coupon[]` | `[]` |
| disabled-coupons | Disabled coupon list | `Array` | `[]` | | disabled-coupons | Disabled coupon list | `Coupon[]` | `[]` |
| enabled-title | Title of coupon list | `string` | `Available` | - | | enabled-title | Title of coupon list | `string` | `Available` | - |
| disabled-title | Title of disabled coupon list | `string` | `Unavailable` | - | | disabled-title | Title of disabled coupon list | `string` | `Unavailable` | - |
| exchange-button-text | Exchange button text | `string` | `Exchange` | | exchange-button-text | Exchange button text | `string` | `Exchange` |
@ -105,7 +105,7 @@ export default {
| change | Triggered when change chosen coupon | index: index of chosen coupon | | change | Triggered when change chosen coupon | index: index of chosen coupon |
| exchange | Triggered when exchange coupon | code: exchange code | | exchange | Triggered when exchange coupon | code: exchange code |
### Coupon Item Data Structure ### Coupon Data Structure
| key | Description | Type | | key | Description | Type |
|------|------|------| |------|------|------|

View File

@ -74,7 +74,7 @@ export default {
|------|------|------|------|------| |------|------|------|------|------|
| title | 单元格标题 | `string` | `优惠券` | - | | title | 单元格标题 | `string` | `优惠券` | - |
| chosen-coupon | 当前选中优惠券的索引 | `number` | `-1` | - | | chosen-coupon | 当前选中优惠券的索引 | `number` | `-1` | - |
| coupons | 可用优惠券列表 | `Array` | `[]` | - | | coupons | 可用优惠券列表 | `Coupon[]` | `[]` | - |
| editable | 能否切换优惠券 | `boolean` | `true` | - | | editable | 能否切换优惠券 | `boolean` | `true` | - |
| border | 是否显示内边框 | `boolean` | `true` | - | | border | 是否显示内边框 | `boolean` | `true` | - |
| currency | 货币符号 | `string` | `¥` | - | 1.5.0 | | currency | 货币符号 | `string` | `¥` | - | 1.5.0 |
@ -85,8 +85,8 @@ export default {
|------|------|------|------|------| |------|------|------|------|------|
| v-model | 当前输入的兑换码 | `string` | - | - | | v-model | 当前输入的兑换码 | `string` | - | - |
| chosen-coupon | 当前选中优惠券的索引 | `number` | `-1` | - | | chosen-coupon | 当前选中优惠券的索引 | `number` | `-1` | - |
| coupons | 可用优惠券列表 | `Array` | `[]` | - | | coupons | 可用优惠券列表 | `Coupon[]` | `[]` | - |
| disabled-coupons | 不可用优惠券列表 | `Array` | `[]` | - | | disabled-coupons | 不可用优惠券列表 | `Coupon[]` | `[]` | - |
| enabled-title | 可用优惠券列表标题 | `string` | `可使用优惠券` | - | | enabled-title | 可用优惠券列表标题 | `string` | `可使用优惠券` | - |
| disabled-title | 不可用优惠券列表标题 | `string` | `不可使用优惠券` | - | | disabled-title | 不可用优惠券列表标题 | `string` | `不可使用优惠券` | - |
| exchange-button-text | 兑换按钮文字 | `string` | `兑换` | - | | exchange-button-text | 兑换按钮文字 | `string` | `兑换` | - |
@ -107,7 +107,7 @@ export default {
| change | 优惠券切换回调 | index, 选中优惠券的索引 | | change | 优惠券切换回调 | index, 选中优惠券的索引 |
| exchange | 兑换优惠券回调 | code, 兑换码 | | exchange | 兑换优惠券回调 | code, 兑换码 |
### 优惠券字段说明 ### Coupon 数据结构
| key | 说明 | 类型 | | key | 说明 | 类型 |
|------|------|------| |------|------|------|

View File

@ -120,7 +120,7 @@ export default {
| title | Title | `string` | - | | title | Title | `string` | - |
| message | Message | `string` | - | | message | Message | `string` | - |
| messageAlign | Message text aligncan be set to `left` `right` | `string` | `center` | | messageAlign | Message text aligncan be set to `left` `right` | `string` | `center` |
| className | Custom className | `string | Array | object` | - | | className | Custom className | `any` | - |
| showConfirmButton | Whether to show confirm button | `boolean` | `true` | | showConfirmButton | Whether to show confirm button | `boolean` | `true` |
| showCancelButton | Whether to show cancel button | `boolean` | `false` | | showCancelButton | Whether to show cancel button | `boolean` | `false` |
| cancelButtonText | Cancel button text | `string` | `Cancel` | | cancelButtonText | Cancel button text | `string` | `Cancel` |

View File

@ -149,7 +149,7 @@ export default {
| title | 标题 | `string` | - | - | | title | 标题 | `string` | - | - |
| message | 文本内容,支持通过`\n`换行 | `string` | - | - | | message | 文本内容,支持通过`\n`换行 | `string` | - | - |
| messageAlign | 内容对齐方式,可选值为`left` `right` | `string` | `center` | 1.5.0 | | messageAlign | 内容对齐方式,可选值为`left` `right` | `string` | `center` | 1.5.0 |
| className | 自定义类名 | `string | Array | object` | - | - | | className | 自定义类名 | `any` | - | - |
| showConfirmButton | 是否展示确认按钮 | `boolean` | `true` | - | | showConfirmButton | 是否展示确认按钮 | `boolean` | `true` | - |
| showCancelButton | 是否展示取消按钮 | `boolean` | `false` | - | | showCancelButton | 是否展示取消按钮 | `boolean` | `false` | - |
| cancelButtonText | 取消按钮文案 | `string` | `取消` | - | | cancelButtonText | 取消按钮文案 | `string` | `取消` | - |

View File

@ -114,7 +114,7 @@ export default {
|------|------|------|------|------| |------|------|------|------|------|
| value | Value of current optioncan use `v-model` | `string | number` | - | | value | Value of current optioncan use `v-model` | `string | number` | - |
| title | Item title | `string` | Text of selected option | | title | Item title | `string` | Text of selected option |
| options | Options | `Array` | `[]` | | options | Options | `Option[]` | `[]` |
| disabled | Whether to disable dropdown item | `boolean` | `false` | | disabled | Whether to disable dropdown item | `boolean` | `false` |
| title-class | Title class | `string` | - | | title-class | Title class | `string` | - |

View File

@ -118,7 +118,7 @@ export default {
|------|------|------|------|------| |------|------|------|------|------|
| value | 当前选中项对应的 value可以通过`v-model`双向绑定 | `string | number` | - | - | | value | 当前选中项对应的 value可以通过`v-model`双向绑定 | `string | number` | - | - |
| title | 菜单项标题 | `string` | 当前选中项文字 | - | | title | 菜单项标题 | `string` | 当前选中项文字 | - |
| options | 选项数组 | `Array` | `[]` | - | | options | 选项数组 | `Option[]` | `[]` | - |
| disabled | 是否禁用菜单 | `boolean` | `false` | - | | disabled | 是否禁用菜单 | `boolean` | `false` | - |
| title-class | 标题额外类名 | `string` | - | - | | title-class | 标题额外类名 | `string` | - | - |

View File

@ -89,7 +89,7 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| images | Images URL list | `Array` | `[]` | | images | Images URL list | `string[]` | `[]` |
| startPosition | Start position | `number` | `0` | | startPosition | Start position | `number` | `0` |
| showIndex | Whether to show index | `boolean` | `true` | | showIndex | Whether to show index | `boolean` | `true` |
| showIndicators | Whether to show indicators | `boolean` | `false` | | showIndicators | Whether to show indicators | `boolean` | `false` |
@ -98,7 +98,7 @@ export default {
| onChange | Triggered when current image change | `Function` | - | | onChange | Triggered when current image change | `Function` | - |
| closeOnPopstate | Whether to close when popstate | `boolean` | `false` | | closeOnPopstate | Whether to close when popstate | `boolean` | `false` |
| asyncClose | Whether to enable async close | `boolean` | `false` | | asyncClose | Whether to enable async close | `boolean` | `false` |
| className | Custom className | `string | Array | object` | - | | className | Custom className | `any` | - |
| lazyLoad | Whether to enable thumb lazy loadshould register [Lazyload](#/en-US/lazyload) component | `boolean` | `false` | | lazyLoad | Whether to enable thumb lazy loadshould register [Lazyload](#/en-US/lazyload) component | `boolean` | `false` |
| maxZoom | Max zoom | `number` | `3` | | maxZoom | Max zoom | `number` | `3` |
| minZoom | Min zoom | `number` | `1/3` | | minZoom | Min zoom | `number` | `1/3` |
@ -107,14 +107,14 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| images | Images URL list | `Array` | `[]` | | images | Images URL list | `string[]` | `[]` |
| start-position | Start position | `number` | `0` | | start-position | Start position | `number` | `0` |
| show-index | Whether to show index | `boolean` | `true` | | show-index | Whether to show index | `boolean` | `true` |
| show-indicators | Whether to show indicators | `boolean` | `false` | | show-indicators | Whether to show indicators | `boolean` | `false` |
| loop | Whether to enable loop | `boolean` | `true` | | loop | Whether to enable loop | `boolean` | `true` |
| async-close | Whether to enable async close | `boolean` | `false` | | async-close | Whether to enable async close | `boolean` | `false` |
| close-on-popstate | Whether to close when popstate | `boolean` | `false` | | close-on-popstate | Whether to close when popstate | `boolean` | `false` |
| class-name | Custom className | `string | Array | object` | - | | class-name | Custom className | `any` | - |
| lazy-load | Whether to enable thumb lazy loadshould register [Lazyload](#/en-US/lazyload) component | `boolean` | `false` | | lazy-load | Whether to enable thumb lazy loadshould register [Lazyload](#/en-US/lazyload) component | `boolean` | `false` |
| max-zoom | Max zoom | `number` | `3` | | max-zoom | Max zoom | `number` | `3` |
| min-zoom | Min zoom | `number` | `1/3` | | min-zoom | Min zoom | `number` | `1/3` |

View File

@ -101,7 +101,7 @@ export default {
| 参数名 | 说明 | 类型 | 默认值 | 版本 | | 参数名 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| images | 需要预览的图片 URL 数组 | `Array` | `[]` | - | | images | 需要预览的图片 URL 数组 | `string[]` | `[]` | - |
| startPosition | 图片预览起始位置索引 | `number` | `0` | - | | startPosition | 图片预览起始位置索引 | `number` | `0` | - |
| showIndex | 是否显示页码 | `boolean` | `true` | - | | showIndex | 是否显示页码 | `boolean` | `true` | - |
| showIndicators | 是否显示轮播指示器 | `boolean` | `false` | - | | showIndicators | 是否显示轮播指示器 | `boolean` | `false` | - |
@ -110,7 +110,7 @@ export default {
| onChange | 切换图片时的回调函数,回调参数为当前索引 | `Function` | - | 2.0.3 | | onChange | 切换图片时的回调函数,回调参数为当前索引 | `Function` | - | 2.0.3 |
| asyncClose | 是否开启异步关闭 | `boolean` | `false` | - | | asyncClose | 是否开启异步关闭 | `boolean` | `false` | - |
| closeOnPopstate | 是否在页面回退时自动关闭 | `boolean` | `false` | 2.0.0 | | closeOnPopstate | 是否在页面回退时自动关闭 | `boolean` | `false` | 2.0.0 |
| className | 自定义类名 | `string | Array | object` | - | 1.5.2 | | className | 自定义类名 | `any` | - | 1.5.2 |
| lazyLoad | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | `boolean` | `false` | 1.5.3 | | lazyLoad | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | `boolean` | `false` | 1.5.3 |
| maxZoom | 手势缩放时,最大缩放比例 | `number` | `3` | 1.6.14 | | maxZoom | 手势缩放时,最大缩放比例 | `number` | `3` | 1.6.14 |
| minZoom | 手势缩放时,最小缩放比例 | `number` | `1/3` | 1.6.14 | | minZoom | 手势缩放时,最小缩放比例 | `number` | `1/3` | 1.6.14 |
@ -121,14 +121,14 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| images | 需要预览的图片 URL 数组 | `Array` | `[]` | 1.1.16 | | images | 需要预览的图片 URL 数组 | `string[]` | `[]` | 1.1.16 |
| start-position | 图片预览起始位置索引 | `number` | `0` | 1.1.16 | | start-position | 图片预览起始位置索引 | `number` | `0` | 1.1.16 |
| show-index | 是否显示页码 | `boolean` | `true` | 1.3.4 | | show-index | 是否显示页码 | `boolean` | `true` | 1.3.4 |
| show-indicators | 是否显示轮播指示器 | `boolean` | `false` | 1.3.10 | | show-indicators | 是否显示轮播指示器 | `boolean` | `false` | 1.3.10 |
| loop | 是否开启循环播放 | `boolean` | `true` | 1.4.4 | | loop | 是否开启循环播放 | `boolean` | `true` | 1.4.4 |
| async-close | 是否开启异步关闭 | `boolean` | `false` | 1.4.8 | | async-close | 是否开启异步关闭 | `boolean` | `false` | 1.4.8 |
| close-on-popstate | 是否在页面回退时自动关闭 | `boolean` | `false` | | close-on-popstate | 是否在页面回退时自动关闭 | `boolean` | `false` |
| class-name | 自定义类名 | `string | Array | object` | - | 1.5.2 | | class-name | 自定义类名 | `any` | - | 1.5.2 |
| lazy-load | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | `boolean` | `false` | 1.5.3 | | lazy-load | 是否开启图片懒加载,须配合 [Lazyload](#/zh-CN/lazyload) 组件使用 | `boolean` | `false` | 1.5.3 |
| max-zoom | 手势缩放时,最大缩放比例 | `number` | `3` | 1.6.14 | | max-zoom | 手势缩放时,最大缩放比例 | `number` | `3` | 1.6.14 |
| min-zoom | 手势缩放时,最小缩放比例 | `number` | `1/3` | 1.6.14 | | min-zoom | 手势缩放时,最小缩放比例 | `number` | `1/3` | 1.6.14 |

View File

@ -62,7 +62,7 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| index-list | Index List | `Array` | `A-Z` | | index-list | Index List | `string[] | number[]` | `A-Z` |
| z-index | z-index | `number` | `1` | | z-index | z-index | `number` | `1` |
| sticky | Whether to enable anchor sticky top | `boolean` | `true` | | sticky | Whether to enable anchor sticky top | `boolean` | `true` |
| sticky-offset-top | Anchor offset top when sticky | `number` | `0` | | sticky-offset-top | Anchor offset top when sticky | `number` | `0` |

View File

@ -66,7 +66,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| index-list | 索引字符列表 | `Array` | `A-Z` | - | | index-list | 索引字符列表 | `string[] | number[]` | `A-Z` | - |
| z-index | z-index 层级 | `number` | `1` | - | | z-index | z-index 层级 | `number` | `1` | - |
| sticky | 是否开启锚点自动吸顶 | `boolean` | `true` | - | | sticky | 是否开启锚点自动吸顶 | `boolean` | `true` | - |
| sticky-offset-top | 锚点自动吸顶时与顶部的距离 | `number` | `0` | 2.0.7 | | sticky-offset-top | 锚点自动吸顶时与顶部的距离 | `number` | `0` | 2.0.7 |

View File

@ -56,7 +56,7 @@ Use `v-lazy:background-image` to set background url, and declare the height of t
| error | Src of the image upon load fail | `string` | - | | error | Src of the image upon load fail | `string` | - |
| preload | Proportion of pre-loading height | `string` | - | | preload | Proportion of pre-loading height | `string` | - |
| attempt | Attempts count | `number` | `3` | | attempt | Attempts count | `number` | `3` |
| listenEvents | Events that you want vue listen for | `Array` | `scroll`... | | listenEvents | Events that you want vue listen for | `string[]` | `scroll`... |
| adapter | Dynamically modify the attribute of element | `object` | - | | adapter | Dynamically modify the attribute of element | `object` | - |
| filter | The image's listener filter | `object` | - | | filter | The image's listener filter | `object` | - |
| lazyComponent | Lazyload component | `boolean` | `false` | | lazyComponent | Lazyload component | `boolean` | `false` |

View File

@ -63,7 +63,7 @@ export default {
| error | 错误时的图片 | `string` | - | - | | error | 错误时的图片 | `string` | - | - |
| preload | 预加载高度的比例 | `string` | - | - | | preload | 预加载高度的比例 | `string` | - | - |
| attempt | 尝试次数 | `number` | `3` | - | | attempt | 尝试次数 | `number` | `3` | - |
| listenEvents | 监听的事件 | `Array` | `scroll`等 | - | | listenEvents | 监听的事件 | `string[]` | `scroll`等 | - |
| adapter | 适配器 | `object` | - | - | | adapter | 适配器 | `object` | - | - |
| filter | 图片 URL 过滤 | `object` | - | - | | filter | 图片 URL 过滤 | `object` | - | - |
| lazyComponent | 是否能懒加载模块 | `boolean` | `false` | - | | lazyComponent | 是否能懒加载模块 | `boolean` | `false` | - |

View File

@ -57,7 +57,7 @@ export default {
| duration | Duration(ms), won't disappear if value is 0 | `number` | `3000` | | duration | Duration(ms), won't disappear if value is 0 | `number` | `3000` |
| color | Message color | `string` | `#fff` | | | color | Message color | `string` | `#fff` | |
| background | Background color | `string` | `#f44` | | background | Background color | `string` | `#f44` |
| className | Custom className | `string | Array | object` | - | | className | Custom className | `any` | - |
| onClick | Callback function after click | `Function` | - | | onClick | Callback function after click | `Function` | - |
| onOpened | Callback function after opened | `Function` | - | | onOpened | Callback function after opened | `Function` | - |
| onClose | Callback function after close | `Function` | - | | onClose | Callback function after close | `Function` | - |

View File

@ -57,7 +57,7 @@ export default {
| duration | 展示时长(ms),值为 0 时notify 不会消失 | `number` | `3000` | - | | duration | 展示时长(ms),值为 0 时notify 不会消失 | `number` | `3000` | - |
| color | 字体颜色 | `string` | `#fff` | - | | color | 字体颜色 | `string` | `#fff` | - |
| background | 背景颜色 | `string` | `#f44` | - | | background | 背景颜色 | `string` | `#f44` | - |
| className | 自定义类名 | `string | Array | object` | - | 1.6.0 | | className | 自定义类名 | `any` | - | 1.6.0 |
| onClick | 点击时的回调函数 | `Function` | - | 2.0.0 | | onClick | 点击时的回调函数 | `Function` | - | 2.0.0 |
| onOpened | 完全展示后的回调函数 | `Function` | - | 2.0.0 | | onOpened | 完全展示后的回调函数 | `Function` | - | 2.0.0 |
| onClose | 关闭时的回调函数 | `Function` | - | 2.0.0 | | onClose | 关闭时的回调函数 | `Function` | - | 2.0.0 |

View File

@ -185,7 +185,7 @@ When Picker columns data is acquired asynchronously, use `loading` prop to show
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| columns | Columns data | `Array` | `[]` | | columns | Columns data | `Column[]` | `[]` |
| 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` | | toolbar-position | Toolbar position, cat be set to `bottom` | `string` | `top` |
| title | Toolbar title | `string` | `''` | | title | Toolbar title | `string` | `''` |
@ -198,6 +198,7 @@ When Picker columns data is acquired asynchronously, use `loading` prop to show
| default-index | Default value index of single column picker | `number` | `0` | | default-index | Default value index of single column picker | `number` | `0` |
### Events ### Events
Picker events will pass different parameters according to the columns are single or multiple Picker events will pass different parameters according to the columns are single or multiple
| Event | Description | Arguments | | Event | Description | Arguments |
@ -212,7 +213,7 @@ Picker events will pass different parameters according to the columns are single
|------|------| |------|------|
| title | Custom title | | title | Custom title |
### Data struct of columns ### Column Data Struct
| key | Description | | key | Description |
|------|------| |------|------|

View File

@ -193,7 +193,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| columns | 对象数组,配置每一列显示的数据 | `Array` | `[]` | - | | columns | 对象数组,配置每一列显示的数据 | `Column[]` | `[]` | - |
| show-toolbar | 是否显示顶部栏 | `boolean` | `false` | - | | show-toolbar | 是否显示顶部栏 | `boolean` | `false` | - |
| toolbar-position | 顶部栏位置,可选值为`bottom` | `string` | `top` | 2.0.0 | | toolbar-position | 顶部栏位置,可选值为`bottom` | `string` | `top` | 2.0.0 |
| title | 顶部栏标题 | `string` | `''` | - | | title | 顶部栏标题 | `string` | `''` | - |
@ -221,7 +221,7 @@ Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
|------|------| |------|------|
| title | 自定义标题内容 | | title | 自定义标题内容 |
### Columns 数据结构 ### Column 数据结构
当传入多列数据时,`columns`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key` 当传入多列数据时,`columns`为一个对象数组,数组中的每一个对象配置每一列,每一列有以下`key`

View File

@ -55,7 +55,7 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| row | Row count | `number` | `0` | | row | Row count | `number` | `0` |
| row-width | Row width, can be array | `number | string | Array` | `100%` | | row-width | Row width, can be array | `number | string | number[] | string []` | `100%` |
| title | Whether to show title placeholder | `boolean` | `false` | | title | Whether to show title placeholder | `boolean` | `false` |
| title-width | Title width | `number | string` | `40%` | | title-width | Title width | `number | string` | `40%` |
| avatar | Whether to show avatar placeholder | `boolean` | `false` | | avatar | Whether to show avatar placeholder | `boolean` | `false` |

View File

@ -61,7 +61,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| row | 段落占位图行数 | `number` | `0` | - | | row | 段落占位图行数 | `number` | `0` | - |
| row-width | 段落占位图宽度,可传数组来设置每一行的宽度 | `number | string | Array` | `100%` | - | | row-width | 段落占位图宽度,可传数组来设置每一行的宽度 | `number | string | number[] | string[]` | `100%` | - |
| title | 是否显示标题占位图 | `boolean` | `false` | - | | title | 是否显示标题占位图 | `boolean` | `false` | - |
| title-width | 标题占位图宽度 | `number | string` | `40%` | - | | title-width | 标题占位图宽度 | `number | string` | `40%` | - |
| avatar | 是否显示头像占位图 | `boolean` | `false` | - | | avatar | 是否显示头像占位图 | `boolean` | `false` | - |

View File

@ -121,7 +121,7 @@ toast2.clear();
| forbidClick | Whether to forbid click background | `boolean` | `false` | | forbidClick | Whether to forbid click background | `boolean` | `false` |
| loadingType | Loading icon type, can be set to `spinner` | `string` | `circular` | | loadingType | Loading icon type, can be set to `spinner` | `string` | `circular` |
| duration | Toast duration(ms), won't disappear if value is 0 | `number` | `3000` | | duration | Toast duration(ms), won't disappear if value is 0 | `number` | `3000` |
| className | Custom className | `string | Array | object` | - | | 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` | - |
| getContainer | Return the mount node for Toast | `string | () => HTMLElement` | `body` | | getContainer | Return the mount node for Toast | `string | () => HTMLElement` | `body` |

View File

@ -121,7 +121,7 @@ toast2.clear();
| forbidClick | 是否禁止背景点击 | `boolean` | `false` | - | | forbidClick | 是否禁止背景点击 | `boolean` | `false` | - |
| loadingType | 加载图标类型, 可选值为 `spinner` | `string` | `circular` | - | | loadingType | 加载图标类型, 可选值为 `spinner` | `string` | `circular` | - |
| duration | 展示时长(ms),值为 0 时toast 不会消失 | `number` | `3000` | - | | duration | 展示时长(ms),值为 0 时toast 不会消失 | `number` | `3000` | - |
| className | 自定义类名 | `string | Array | object` | - | 1.6.0 | | className | 自定义类名 | `any` | - | 1.6.0 |
| onOpened | 完全展示后的回调函数 | `Function` | - | 2.0.0 | | onOpened | 完全展示后的回调函数 | `Function` | - | 2.0.0 |
| onClose | 关闭时的回调函数 | `Function` | - | 1.6.10 | | onClose | 关闭时的回调函数 | `Function` | - | 1.6.10 |
| getContainer | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `string | () => HTMLElement` | `body` | 1.6.3 | | getContainer | 指定挂载的节点,可以传入选择器,<br>或一个返回节点的函数 | `string | () => HTMLElement` | `body` | 1.6.3 |

View File

@ -50,7 +50,7 @@ export default {
| Attribute | Description | Type | Default | | Attribute | Description | Type | Default |
|------|------|------|------| |------|------|------|------|
| items | Required datasets for the component, see Data Structure for detail. | `Array` | `[]` | | items | Required datasets for the component | `Item[]` | `[]` |
| height | Height (px) | `number` | `300` | | height | Height (px) | `number` | `300` |
| main-Active-index | The index of selected parent node | `number` | `0` | | main-Active-index | The index of selected parent node | `number` | `0` |
| active-id | Id of selected item | `string | number` | `0` | | active-id | Id of selected item | `string | number` | `0` |
@ -62,7 +62,7 @@ export default {
| navclick | triggered when parent node is selected | index: index of selected parent | | navclick | triggered when parent node is selected | index: index of selected parent |
| itemclick | triggered when item is selected | data: selected item | | itemclick | triggered when item is selected | data: selected item |
### Data Structure ### Item Data Structure
`items` should be an array contains specified tree objects. `items` should be an array contains specified tree objects.

View File

@ -50,7 +50,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 | | 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------| |------|------|------|------|------|
| items | 分类显示所需的数据,结构参见下方 | `Array` | `[]` | - | | items | 分类显示所需的数据 | `Item[]` | `[]` | - |
| height | 高度,单位为 px | `number` | `300` | - | | height | 高度,单位为 px | `number` | `300` | - |
| main-active-index | 左侧导航高亮的索引 | `number` | `0` | - | | main-active-index | 左侧导航高亮的索引 | `number` | `0` | - |
| active-id | 右侧选择项高亮的数据id | `string | number` | `0` | - | | active-id | 右侧选择项高亮的数据id | `string | number` | `0` | - |
@ -62,7 +62,7 @@ export default {
| navclick | 左侧导航点击时,触发的事件 | index被点击的导航的索引 | | navclick | 左侧导航点击时,触发的事件 | index被点击的导航的索引 |
| itemclick | 右侧选择项被点击时,会触发的事件 | data: 该点击项的数据 | | itemclick | 右侧选择项被点击时,会触发的事件 | data: 该点击项的数据 |
### items 分类显示所需数据的数据结构 ### Item 数据结构
`items` 整体为一个数组,数组内包含一系列描述分类的对象。 `items` 整体为一个数组,数组内包含一系列描述分类的对象。