[improvement] Actionsheet: add index param for select event (#2917)

This commit is contained in:
neverland
2019-03-07 20:59:46 +08:00
committed by GitHub
parent c9e578c0cf
commit bfa8f38585
4 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ function Actionsheet(
</div>
);
const Option = (item: ActionsheetItem) => (
const Option = (item: ActionsheetItem, index: number) => (
<div
class={[
bem('item', { disabled: item.disabled || item.loading }),
@@ -62,7 +62,7 @@ function Actionsheet(
item.callback(item);
}
emit(ctx, 'select', item);
emit(ctx, 'select', item, index);
}
}}
>