From ec3440d4b371fa9cb7ac119d0f1e648ecd14669f Mon Sep 17 00:00:00 2001 From: adonis Date: Thu, 4 Jun 2026 22:29:28 +0330 Subject: [PATCH] handle mobile user --- src/components/BasicActionSheet.vue | 30 +++- src/components/mobile/MobileDetailSheet.vue | 3 +- src/components/mobile/MobileIconButton.vue | 3 +- src/components/mobile/MobileSheetHeader.vue | 18 ++- .../components/CustomerMobileCardList.vue | 28 ++-- .../components/CustomerMobileDetailSheet.vue | 133 +++++++++++++----- .../components/CustomerMobileListItem.vue | 63 ++++++--- .../customers/base/components/table.vue | 10 +- src/pages/menuPages/customers/base/index.vue | 72 +++++++++- 9 files changed, 285 insertions(+), 75 deletions(-) diff --git a/src/components/BasicActionSheet.vue b/src/components/BasicActionSheet.vue index a73e2a9..17719e9 100644 --- a/src/components/BasicActionSheet.vue +++ b/src/components/BasicActionSheet.vue @@ -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 }]" > -
+
@@ -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(), { 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; diff --git a/src/components/mobile/MobileDetailSheet.vue b/src/components/mobile/MobileDetailSheet.vue index acb78d9..4a0f8a5 100644 --- a/src/components/mobile/MobileDetailSheet.vue +++ b/src/components/mobile/MobileDetailSheet.vue @@ -1,8 +1,9 @@