[Improvement] AddressEdit: add default slot (#573)

This commit is contained in:
neverland 2018-01-24 16:19:16 +08:00 committed by GitHub
parent e3ef5c853e
commit 8f97bc9f0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 26 additions and 11 deletions

View File

@ -77,6 +77,12 @@ export default {
| delete | Triggered when click delete | contentForm content |
| change-detail | Triggered when address detail changed | value: address detail |
### Slot
| Name | Description |
|-----------|-----------|
| - | Custom content below postal |
### Data Structure
#### addressInfo Data Structure

View File

@ -79,6 +79,13 @@ export default {
| change-area | 修改收件地区时触发 | values: 地区信息 |
| change-detail | 修改详细地址时触发 | value: 详细地址内容 |
### Slot
| 名称 | 说明 |
|-----------|-----------|
| - | 在邮政编码下方插入内容 |
### 数据格式
#### addressInfo 数据格式

View File

@ -52,7 +52,7 @@ Vue.use(Card);
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| title | 自定义标题 |
| desc | 自定义描述 |

View File

@ -66,7 +66,7 @@ export default {
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| - | 自定义显示内容 |
| left | 左侧滑动内容 |

View File

@ -92,7 +92,7 @@ Vue.use(CellGroup);
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| - | 自定义显示内容 |
| icon | 自定义`icon` |

View File

@ -113,6 +113,6 @@ Filed 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`k
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| icon | 自定义icon |

View File

@ -57,7 +57,7 @@ export default {
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| title | 自定义标题 |
| left | 自定义左侧区域内容 |

View File

@ -41,7 +41,7 @@ Vue.use(Panel);
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| - | 自定义内容 |
| header | 自定义 header |

View File

@ -52,7 +52,7 @@ export default {
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| - | 自定义内容 |
| normal | 非下拉状态时顶部内容 |

View File

@ -64,6 +64,6 @@ Search 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| action | 自定义搜索框右侧按钮,需要在`showAction`为 true 时才会显示 |

View File

@ -80,7 +80,7 @@ Vue.use(SubmitBar);
### Slot
| Name | 说明 |
| 名称 | 说明 |
|-----------|-----------|
| default | 自定义订单栏左侧内容 |
| tip | 提示文案中的额外操作和说明 |

View File

@ -49,6 +49,6 @@ Vue.use(Tag);
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| - | 自定义 Tag 显示内容 |

View File

@ -47,6 +47,6 @@ export default {
### Slot
| name | 描述 |
| 名称 | 说明 |
|-----------|-----------|
| - | 自定义上传显示图标 |

View File

@ -44,6 +44,7 @@
:error="errorInfo.postal_code"
@focus="onFocus('postal_code')"
/>
<slot />
<switch-cell
v-if="showSetDefault"
v-show="!hideBottomFields"
@ -158,6 +159,7 @@ export default create({
hideBottomFields() {
return this.searchResult.length && this.detailFocused;
},
computedAddressText() {
return this.addressText || this.$t('addressText');
}