From 1383d37d28040fe342f7e11de2ad302119518718 Mon Sep 17 00:00:00 2001 From: adonis Date: Tue, 23 Jun 2026 16:29:36 +0330 Subject: [PATCH] fix user header and modal detail --- src/App.vue | 1 + src/app/createApp.ts | 7 +++ src/assets/css/main.less | 6 ++ .../BasicPacks/BasicActionSheet.vue | 3 +- src/components/BasicPacks/BasicModal.vue | 7 ++- src/components/DialogVant.vue | 3 +- src/utils/zIndex.ts | 6 ++ src/views/base/home/components/AppHeader.vue | 63 ++++++++++++++++--- 8 files changed, 83 insertions(+), 13 deletions(-) create mode 100644 src/utils/zIndex.ts diff --git a/src/App.vue b/src/App.vue index 111f49e..5a595b8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -268,6 +268,7 @@ watch(showSplash, (visible) => { --app-z-wallet-add-bar: 4510; --app-z-action-sheet: 5200; --app-z-dialog: 5300; + --app-z-modal: 1010000; } .app-main { diff --git a/src/app/createApp.ts b/src/app/createApp.ts index 90d7ada..cf4c714 100644 --- a/src/app/createApp.ts +++ b/src/app/createApp.ts @@ -1,9 +1,16 @@ import { createApp } from 'vue' import { createPinia } from 'pinia' +import { setDialogDefaultOptions } from 'vant' import VueLazyLoad from 'vue3-lazyload' import VueApexCharts from 'vue3-apexcharts' import App from '@/App.vue' import router from '@/router' +import { APP_Z_MODAL } from '@/utils/zIndex' + +setDialogDefaultOptions({ + teleport: 'body', + zIndex: APP_Z_MODAL, +}) export function createVueApp() { const app = createApp(App) diff --git a/src/assets/css/main.less b/src/assets/css/main.less index 5bfb40b..4704d57 100644 --- a/src/assets/css/main.less +++ b/src/assets/css/main.less @@ -152,6 +152,12 @@ html.app-layout--desktop { transition: background-color 0.3s ease; } +/* ماسک مدال روی کل صفحه — هدر، ناوبری و فوتر اعتبار */ +.ant-modal-mask, +.ant-modal-wrap { + z-index: var(--app-z-modal, 1010000) !important; +} + .slide-left-enter-active, .slide-left-leave-active, .slide-right-enter-active, diff --git a/src/components/BasicPacks/BasicActionSheet.vue b/src/components/BasicPacks/BasicActionSheet.vue index f945068..cabe9dd 100644 --- a/src/components/BasicPacks/BasicActionSheet.vue +++ b/src/components/BasicPacks/BasicActionSheet.vue @@ -55,6 +55,7 @@