feat(AddressList): add new slot item-bottom (#5629)

This commit is contained in:
rex
2020-02-07 10:07:38 +08:00
committed by GitHub
parent e42f3e79c2
commit d97e679e68
7 changed files with 82 additions and 57 deletions
+4
View File
@@ -23,6 +23,7 @@ export type AddressListProps = {
export type AddressListSlots = DefaultSlots & {
top?: ScopedSlot;
'item-bottom'?: ScopedSlot;
};
const [createComponent, bem, t] = createNamespace('address-list');
@@ -45,6 +46,9 @@ function AddressList(
disabled={disabled}
switchable={props.switchable}
defaultTagText={props.defaultTagText}
scopedSlots={{
bottom: slots['item-bottom'],
}}
onSelect={() => {
emit(ctx, disabled ? 'select-disabled' : 'select', item, index);