[new feature] ActionSheet: add open、close events (#3639)

This commit is contained in:
neverland
2019-06-26 14:14:43 +08:00
committed by GitHub
parent c4512dbc26
commit c6f8fca41f
3 changed files with 9 additions and 11 deletions
+1 -11
View File
@@ -38,14 +38,6 @@ function ActionSheet(
) {
const { title, cancelText } = props;
function onInput(value: boolean) {
emit(ctx, 'input', value);
}
function onClickOverlay() {
emit(ctx, 'click-overlay');
}
function onCancel() {
emit(ctx, 'input', false);
emit(ctx, 'cancel');
@@ -131,9 +123,7 @@ function ActionSheet(
lockScroll={props.lockScroll}
getContainer={props.getContainer}
closeOnClickOverlay={props.closeOnClickOverlay}
onInput={onInput}
onClick-overlay={onClickOverlay}
{...inherit(ctx)}
{...inherit(ctx, true)}
>
{Header()}
{props.actions.map(Option)}