mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(ActionSheet): closeOnPopstate prop not work (#9644)
This commit is contained in:
parent
15b08400b0
commit
e5a92fe6a9
@ -27,6 +27,13 @@ export type ActionSheetAction = {
|
|||||||
className?: unknown;
|
className?: unknown;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const popupKeys = [
|
||||||
|
...popupSharedPropKeys,
|
||||||
|
'round',
|
||||||
|
'closeOnPopstate',
|
||||||
|
'safeAreaInsetBottom',
|
||||||
|
] as const;
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name,
|
name,
|
||||||
|
|
||||||
@ -38,7 +45,7 @@ export default defineComponent({
|
|||||||
closeable: truthProp,
|
closeable: truthProp,
|
||||||
cancelText: String,
|
cancelText: String,
|
||||||
description: String,
|
description: String,
|
||||||
closeOnPopstate: Boolean,
|
closeOnPopstate: truthProp,
|
||||||
closeOnClickAction: Boolean,
|
closeOnClickAction: Boolean,
|
||||||
safeAreaInsetBottom: truthProp,
|
safeAreaInsetBottom: truthProp,
|
||||||
}),
|
}),
|
||||||
@ -140,10 +147,8 @@ export default defineComponent({
|
|||||||
return () => (
|
return () => (
|
||||||
<Popup
|
<Popup
|
||||||
class={bem()}
|
class={bem()}
|
||||||
round={props.round}
|
|
||||||
position="bottom"
|
position="bottom"
|
||||||
safeAreaInsetBottom={props.safeAreaInsetBottom}
|
{...pick(props, popupKeys)}
|
||||||
{...pick(props, popupSharedPropKeys)}
|
|
||||||
{...{ 'onUpdate:show': updateShow }}
|
{...{ 'onUpdate:show': updateShow }}
|
||||||
>
|
>
|
||||||
{renderHeader()}
|
{renderHeader()}
|
||||||
|
@ -185,7 +185,7 @@ export default {
|
|||||||
| overlay-style | Custom overlay style | _object_ | - |
|
| overlay-style | Custom overlay style | _object_ | - |
|
||||||
| lock-scroll | Whether to lock background scroll | _boolean_ | `true` |
|
| lock-scroll | Whether to lock background scroll | _boolean_ | `true` |
|
||||||
| lazy-render | Whether to lazy render util appeared | _boolean_ | `true` |
|
| lazy-render | Whether to lazy render util appeared | _boolean_ | `true` |
|
||||||
| close-on-popstate | Whether to close when popstate | _boolean_ | `false` |
|
| close-on-popstate | Whether to close when popstate | _boolean_ | `true` |
|
||||||
| close-on-click-action | Whether to close when an action is clicked | _boolean_ | `false` |
|
| close-on-click-action | Whether to close when an action is clicked | _boolean_ | `false` |
|
||||||
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `true` |
|
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `true` |
|
||||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
|
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
|
||||||
|
@ -195,7 +195,7 @@ export default {
|
|||||||
| overlay-style | 自定义遮罩层样式 | _object_ | - |
|
| overlay-style | 自定义遮罩层样式 | _object_ | - |
|
||||||
| lock-scroll | 是否锁定背景滚动 | _boolean_ | `true` |
|
| lock-scroll | 是否锁定背景滚动 | _boolean_ | `true` |
|
||||||
| lazy-render | 是否在显示弹层时才渲染节点 | _boolean_ | `true` |
|
| lazy-render | 是否在显示弹层时才渲染节点 | _boolean_ | `true` |
|
||||||
| close-on-popstate | 是否在页面回退时自动关闭 | _boolean_ | `false` |
|
| close-on-popstate | 是否在页面回退时自动关闭 | _boolean_ | `true` |
|
||||||
| close-on-click-action | 是否在点击选项后关闭 | _boolean_ | `false` |
|
| close-on-click-action | 是否在点击选项后关闭 | _boolean_ | `false` |
|
||||||
| close-on-click-overlay | 是否在点击遮罩层后关闭 | _boolean_ | `true` |
|
| close-on-click-overlay | 是否在点击遮罩层后关闭 | _boolean_ | `true` |
|
||||||
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei) | _boolean_ | `true` |
|
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei) | _boolean_ | `true` |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user