mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-22 22:49:15 +08:00
[Improvement] AddressEdit: add default slot (#573)
This commit is contained in:
parent
e3ef5c853e
commit
8f97bc9f0f
@ -77,6 +77,12 @@ export default {
|
|||||||
| delete | Triggered when click delete | content:Form content |
|
| delete | Triggered when click delete | content:Form content |
|
||||||
| change-detail | Triggered when address detail changed | value: address detail |
|
| change-detail | Triggered when address detail changed | value: address detail |
|
||||||
|
|
||||||
|
### Slot
|
||||||
|
|
||||||
|
| Name | Description |
|
||||||
|
|-----------|-----------|
|
||||||
|
| - | Custom content below postal |
|
||||||
|
|
||||||
### Data Structure
|
### Data Structure
|
||||||
|
|
||||||
#### addressInfo Data Structure
|
#### addressInfo Data Structure
|
||||||
|
@ -79,6 +79,13 @@ export default {
|
|||||||
| change-area | 修改收件地区时触发 | values: 地区信息 |
|
| change-area | 修改收件地区时触发 | values: 地区信息 |
|
||||||
| change-detail | 修改详细地址时触发 | value: 详细地址内容 |
|
| change-detail | 修改详细地址时触发 | value: 详细地址内容 |
|
||||||
|
|
||||||
|
### Slot
|
||||||
|
|
||||||
|
| 名称 | 说明 |
|
||||||
|
|-----------|-----------|
|
||||||
|
| - | 在邮政编码下方插入内容 |
|
||||||
|
|
||||||
|
|
||||||
### 数据格式
|
### 数据格式
|
||||||
|
|
||||||
#### addressInfo 数据格式
|
#### addressInfo 数据格式
|
||||||
|
@ -52,7 +52,7 @@ Vue.use(Card);
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| title | 自定义标题 |
|
| title | 自定义标题 |
|
||||||
| desc | 自定义描述 |
|
| desc | 自定义描述 |
|
||||||
|
@ -66,7 +66,7 @@ export default {
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| - | 自定义显示内容 |
|
| - | 自定义显示内容 |
|
||||||
| left | 左侧滑动内容 |
|
| left | 左侧滑动内容 |
|
||||||
|
@ -92,7 +92,7 @@ Vue.use(CellGroup);
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| - | 自定义显示内容 |
|
| - | 自定义显示内容 |
|
||||||
| icon | 自定义`icon` |
|
| icon | 自定义`icon` |
|
||||||
|
@ -113,6 +113,6 @@ Filed 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`k
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| icon | 自定义icon |
|
| icon | 自定义icon |
|
||||||
|
@ -57,7 +57,7 @@ export default {
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| title | 自定义标题 |
|
| title | 自定义标题 |
|
||||||
| left | 自定义左侧区域内容 |
|
| left | 自定义左侧区域内容 |
|
||||||
|
@ -41,7 +41,7 @@ Vue.use(Panel);
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| - | 自定义内容 |
|
| - | 自定义内容 |
|
||||||
| header | 自定义 header |
|
| header | 自定义 header |
|
||||||
|
@ -52,7 +52,7 @@ export default {
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| - | 自定义内容 |
|
| - | 自定义内容 |
|
||||||
| normal | 非下拉状态时顶部内容 |
|
| normal | 非下拉状态时顶部内容 |
|
||||||
|
@ -64,6 +64,6 @@ Search 默认支持 Input 标签所有的原生事件,如 `focus`、`blur`、`
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| action | 自定义搜索框右侧按钮,需要在`showAction`为 true 时才会显示 |
|
| action | 自定义搜索框右侧按钮,需要在`showAction`为 true 时才会显示 |
|
||||||
|
@ -80,7 +80,7 @@ Vue.use(SubmitBar);
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| Name | 说明 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| default | 自定义订单栏左侧内容 |
|
| default | 自定义订单栏左侧内容 |
|
||||||
| tip | 提示文案中的额外操作和说明 |
|
| tip | 提示文案中的额外操作和说明 |
|
||||||
|
@ -49,6 +49,6 @@ Vue.use(Tag);
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| - | 自定义 Tag 显示内容 |
|
| - | 自定义 Tag 显示内容 |
|
||||||
|
@ -47,6 +47,6 @@ export default {
|
|||||||
|
|
||||||
### Slot
|
### Slot
|
||||||
|
|
||||||
| name | 描述 |
|
| 名称 | 说明 |
|
||||||
|-----------|-----------|
|
|-----------|-----------|
|
||||||
| - | 自定义上传显示图标 |
|
| - | 自定义上传显示图标 |
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
:error="errorInfo.postal_code"
|
:error="errorInfo.postal_code"
|
||||||
@focus="onFocus('postal_code')"
|
@focus="onFocus('postal_code')"
|
||||||
/>
|
/>
|
||||||
|
<slot />
|
||||||
<switch-cell
|
<switch-cell
|
||||||
v-if="showSetDefault"
|
v-if="showSetDefault"
|
||||||
v-show="!hideBottomFields"
|
v-show="!hideBottomFields"
|
||||||
@ -158,6 +159,7 @@ export default create({
|
|||||||
hideBottomFields() {
|
hideBottomFields() {
|
||||||
return this.searchResult.length && this.detailFocused;
|
return this.searchResult.length && this.detailFocused;
|
||||||
},
|
},
|
||||||
|
|
||||||
computedAddressText() {
|
computedAddressText() {
|
||||||
return this.addressText || this.$t('addressText');
|
return this.addressText || this.$t('addressText');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user