diff --git a/src/action-sheet/index.less b/src/action-sheet/index.less
index d8b9fe81f..9928c7bcb 100644
--- a/src/action-sheet/index.less
+++ b/src/action-sheet/index.less
@@ -8,6 +8,12 @@
overflow: hidden;
color: @action-sheet-item-text-color;
+ &__content {
+ flex: 1;
+ overflow-y: auto;
+ -webkit-overflow-scrolling: touch;
+ }
+
&__item,
&__cancel {
display: block;
@@ -103,16 +109,4 @@
color: @action-sheet-close-icon-active-color;
}
}
-
- &__inner {
- display: flex;
- flex: 1;
- flex-direction: column;
- overflow: hidden;
- }
-
- &__main {
- flex: 1;
- overflow-y: scroll;
- }
}
diff --git a/src/action-sheet/index.tsx b/src/action-sheet/index.tsx
index 94f77860d..590bd90b3 100644
--- a/src/action-sheet/index.tsx
+++ b/src/action-sheet/index.tsx
@@ -75,12 +75,6 @@ function ActionSheet(
}
}
- function Content() {
- if (slots.default) {
- return
{slots.default()}
;
- }
- }
-
function Option(item: ActionSheetItem, index: number) {
const { disabled, loading, callback } = item;
@@ -159,15 +153,13 @@ function ActionSheet(
safeAreaInsetBottom={props.safeAreaInsetBottom}
{...inherit(ctx, true)}
>
-
- {Header()}
- {Description()}
-
- {props.actions && props.actions.map(Option)}
- {Content()}
-
- {CancelText()}
+ {Header()}
+ {Description()}
+
+ {props.actions && props.actions.map(Option)}
+ {slots.default?.()}
+ {CancelText()}
);
}
diff --git a/src/action-sheet/test/__snapshots__/index.spec.js.snap b/src/action-sheet/test/__snapshots__/index.spec.js.snap
index 95fde23d8..932b1a226 100644
--- a/src/action-sheet/test/__snapshots__/index.spec.js.snap
+++ b/src/action-sheet/test/__snapshots__/index.spec.js.snap
@@ -2,86 +2,66 @@
exports[`callback events 1`] = `
`;
exports[`close-icon prop 1`] = `
`;
exports[`closeable prop 1`] = `
`;
exports[`color option 1`] = `
`;
exports[`description prop 1`] = `
`;
exports[`description slot 1`] = `
`;
exports[`disable lazy-render 1`] = `
`;
exports[`render title and default slot 1`] = `
`;
exports[`round prop 1`] = `
`;