From 27b761f534186a6bfa2e8e54cc78ccb51ec48e25 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Fri, 13 Nov 2020 15:12:01 +0800 Subject: [PATCH] fix(ActionSheet): missing callback option --- src/action-sheet/index.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/action-sheet/index.js b/src/action-sheet/index.js index 4335ef1bb..d8eb2d711 100644 --- a/src/action-sheet/index.js +++ b/src/action-sheet/index.js @@ -78,7 +78,15 @@ export default createComponent({ }; const renderOption = (item, index) => { - const { name, color, subname, loading, disabled, className } = item; + const { + name, + color, + subname, + loading, + callback, + disabled, + className, + } = item; const Content = loading ? ( @@ -90,7 +98,12 @@ export default createComponent({ ); const onClick = () => { + if (callback) { + callback(item); + } + emit('select', item, index); + if (props.closeOnClickAction) { onUpdateShow(false); }