handle mobile user

This commit is contained in:
2026-06-04 22:29:28 +03:30
parent fe0734a529
commit ec3440d4b3
9 changed files with 285 additions and 75 deletions
+28 -2
View File
@@ -50,9 +50,9 @@
:closable="false"
:destroy-on-close="true"
:height="drawerHeight"
class="basic-action-sheet"
:class="['basic-action-sheet', { 'basic-action-sheet--compact': compact }]"
>
<div class="basic-action-sheet__container">
<div class="basic-action-sheet__container" :class="{ 'basic-action-sheet__container--compact': compact }">
<div class="flex cursor-pointer justify-center pt-2" @click="visibleProxy = false">
<span class="w-12 rounded-sm border-t-2 border-t-solid border-t-gray-500"></span>
</div>
@@ -103,6 +103,8 @@ interface Props {
modalWidth?: string
loading?: boolean
drawerHeight?: string
/** When true, drawer height follows content (no empty flex gap). */
compact?: boolean
cancelText?: string
showButton?: boolean
showCancel?: boolean
@@ -116,6 +118,7 @@ const props = withDefaults(defineProps<Props>(), {
modalWidth: '36rem',
loading: false,
drawerHeight: ACTION_SHEET_HEIGHT,
compact: false,
cancelText: 'بازگشت',
showButton: false,
showCancel: true,
@@ -175,6 +178,29 @@ function handleCancel() {
padding: 0 16px 12px;
}
.basic-action-sheet--compact {
.ant-drawer-content-wrapper {
height: auto !important;
max-height: 88vh;
}
.ant-drawer-content {
height: auto !important;
max-height: 88vh;
}
}
.basic-action-sheet__container--compact {
height: auto;
min-height: 0;
max-height: 88vh;
}
.basic-action-sheet__container--compact .basic-action-sheet__content {
flex: 0 1 auto;
max-height: calc(88vh - 40px);
}
.basic-action-sheet__footer {
position: sticky;
bottom: 0;