mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(ActionSheet): missing callback option
This commit is contained in:
parent
00bc30c235
commit
27b761f534
@ -78,7 +78,15 @@ export default createComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const renderOption = (item, index) => {
|
const renderOption = (item, index) => {
|
||||||
const { name, color, subname, loading, disabled, className } = item;
|
const {
|
||||||
|
name,
|
||||||
|
color,
|
||||||
|
subname,
|
||||||
|
loading,
|
||||||
|
callback,
|
||||||
|
disabled,
|
||||||
|
className,
|
||||||
|
} = item;
|
||||||
|
|
||||||
const Content = loading ? (
|
const Content = loading ? (
|
||||||
<Loading class={bem('loading-icon')} />
|
<Loading class={bem('loading-icon')} />
|
||||||
@ -90,7 +98,12 @@ export default createComponent({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const onClick = () => {
|
const onClick = () => {
|
||||||
|
if (callback) {
|
||||||
|
callback(item);
|
||||||
|
}
|
||||||
|
|
||||||
emit('select', item, index);
|
emit('select', item, index);
|
||||||
|
|
||||||
if (props.closeOnClickAction) {
|
if (props.closeOnClickAction) {
|
||||||
onUpdateShow(false);
|
onUpdateShow(false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user