feat(AddressEdit): add click feedback of area cell (#5120)

This commit is contained in:
neverland
2019-11-26 20:59:47 +08:00
committed by GitHub
parent 592bcafda0
commit d8e30bdcac
7 changed files with 33 additions and 29 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
left: 0;
z-index: @contact-list-add-button-z-index;
padding: 5px 16px;
background-color: #fff;
background-color: @white;
}
&__add {
+10 -8
View File
@@ -9,7 +9,7 @@ import Radio from '../radio';
import RadioGroup from '../radio-group';
// Types
import { CreateElement, RenderContext } from 'vue/types';
import { CreateElement, RenderContext, VNode } from 'vue/types';
import { DefaultSlots } from '../utils/types';
export type ContactListItem = {
@@ -67,14 +67,17 @@ function ContactList(
}
function Content() {
return [
`${item.name}${item.tel}`,
item.isDefault && props.defaultTagText && (
const nodes = ([`${item.name}${item.tel}`] as unknown[]) as VNode[];
if (item.isDefault && props.defaultTagText) {
nodes.push(
<Tag type="danger" round class={bem('item-tag')}>
{props.defaultTagText}
</Tag>
)
];
);
}
return nodes;
}
return (
@@ -84,11 +87,10 @@ function ContactList(
center
class={bem('item')}
valueClass={bem('item-value')}
// @ts-ignore
scopedSlots={{
icon: LeftIcon,
default: Content,
'right-icon': RightIcon,
icon: LeftIcon
}}
onClick={onClick}
/>