mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 10:56:35 +08:00
parent
1805f21308
commit
e19ba76aba
@ -32,6 +32,10 @@ export default createComponent({
|
||||
type: String,
|
||||
default: 'down',
|
||||
},
|
||||
closeOnClickOutside: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
@ -59,9 +63,11 @@ export default createComponent({
|
||||
});
|
||||
|
||||
const onClickAway = () => {
|
||||
children.forEach((item) => {
|
||||
item.toggle(false);
|
||||
});
|
||||
if (props.closeOnClickOutside) {
|
||||
children.forEach((item) => {
|
||||
item.toggle(false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const updateOffset = () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user