diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index c537ff661..831710a4b 100755 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -182,6 +182,8 @@ export default { rootStyle() { return { + '--window-width': `${this.windowWidth}px`, + '--window-height': `${this.windowHeight}px`, '--window-scroll-y': `${this.windowScrollY}px`, '--status-bar-height': `${this.safeAreaSize.top}px`, '--status-bar-color': this.statusColor || '#ffffff', diff --git a/resources/assets/js/components/AIAssistant.vue b/resources/assets/js/components/AIAssistant.vue index 1dfc9ea51..22f2da53d 100644 --- a/resources/assets/js/components/AIAssistant.vue +++ b/resources/assets/js/components/AIAssistant.vue @@ -845,9 +845,9 @@ export default { display: flex; flex-direction: column; gap: 16px; - max-height: calc(100vh - 344px); + max-height: calc(var(--window-height, 100vh) - 344px); @media (height <= 900px) { - max-height: calc(100vh - 214px); + max-height: calc(var(--window-height, 100vh) - 214px); } .ai-assistant-output { diff --git a/resources/assets/sass/components/search-box.scss b/resources/assets/sass/components/search-box.scss index 91a73afd3..29443ae66 100755 --- a/resources/assets/sass/components/search-box.scss +++ b/resources/assets/sass/components/search-box.scss @@ -194,11 +194,11 @@ .search-list { overflow: auto; - max-height: calc(100vh - 305px); + max-height: calc(var(--window-height, 100vh) - 305px); overscroll-behavior: contain; @media (height <= 900px) { - max-height: calc(100vh - 175px); + max-height: calc(var(--window-height, 100vh) - 175px); } > ul { diff --git a/resources/assets/sass/components/user-select.scss b/resources/assets/sass/components/user-select.scss index 0b65a1787..a552fe2f7 100755 --- a/resources/assets/sass/components/user-select.scss +++ b/resources/assets/sass/components/user-select.scss @@ -236,10 +236,10 @@ display: flex; flex-direction: column; min-height: 300px; - max-height: calc(100vh - 410px); + max-height: calc(var(--window-height, 100vh) - 410px); @media (height <= 900px) { - max-height: calc(100vh - 280px); + max-height: calc(var(--window-height, 100vh) - 280px); } ul { diff --git a/resources/assets/sass/pages/components/dialog-droup-word-chain.scss b/resources/assets/sass/pages/components/dialog-droup-word-chain.scss index acb10e0ce..8106ce402 100644 --- a/resources/assets/sass/pages/components/dialog-droup-word-chain.scss +++ b/resources/assets/sass/pages/components/dialog-droup-word-chain.scss @@ -1,6 +1,6 @@ .dialog-droup-word-chain { .ivu-modal-body { - max-height: calc(100vh - 260px); + max-height: calc(var(--window-height, 100vh) - 260px); overflow: auto; padding-top: 0 !important; padding-right: 0 !important; @@ -58,7 +58,7 @@ display: flex; flex-direction: column; height: 100%; - max-height: calc(100vh - 265px); + max-height: calc(var(--window-height, 100vh) - 265px); .source { margin-right: 32px; diff --git a/resources/assets/sass/pages/components/project-panel.scss b/resources/assets/sass/pages/components/project-panel.scss index 972ae7981..c2f35ea5e 100644 --- a/resources/assets/sass/pages/components/project-panel.scss +++ b/resources/assets/sass/pages/components/project-panel.scss @@ -955,7 +955,7 @@ } .project-panel-project-menu-dropdown { - max-height: calc(100vh - 120px); + max-height: calc(var(--window-height, 100vh) - 120px); overflow-y: auto; } @@ -963,7 +963,7 @@ .project-panel-more-dropdown-warp { height: 400px; min-height: 120px; - max-height: calc(100vh - 250px); + max-height: calc(var(--window-height, 100vh) - 250px); overflow-y: auto; list-style: none; &::-webkit-scrollbar { diff --git a/resources/assets/sass/pages/components/project-workflow.scss b/resources/assets/sass/pages/components/project-workflow.scss index 3075adcae..5a53b17d2 100644 --- a/resources/assets/sass/pages/components/project-workflow.scss +++ b/resources/assets/sass/pages/components/project-workflow.scss @@ -548,7 +548,7 @@ .taskflow-config-more-dropdown-warp { height: 400px; min-height: 180px; - max-height: calc(100vh - 250px); + max-height: calc(var(--window-height, 100vh) - 250px); overflow-y: auto; list-style: none; } diff --git a/resources/assets/sass/pages/components/user-detail.scss b/resources/assets/sass/pages/components/user-detail.scss index bfbde67dd..9b033b9c4 100755 --- a/resources/assets/sass/pages/components/user-detail.scss +++ b/resources/assets/sass/pages/components/user-detail.scss @@ -235,10 +235,10 @@ .dialog-list { padding: 0 12px; overflow-y: auto; - max-height: calc(100vh - 310px); + max-height: calc(var(--window-height, 100vh) - 310px); @media (height <= 900px) { - max-height: calc(100vh - 180px); + max-height: calc(var(--window-height, 100vh) - 180px); } .dialog-item { diff --git a/resources/assets/sass/pages/page-approve.scss b/resources/assets/sass/pages/page-approve.scss index 9b875c7d3..5622c267a 100644 --- a/resources/assets/sass/pages/page-approve.scss +++ b/resources/assets/sass/pages/page-approve.scss @@ -90,7 +90,7 @@ .approve-mains { display: flex; flex: 1 1 auto; - height: calc(100vh - 190px - var(--status-bar-height) - var(--navigation-bar-height)); + height: calc(var(--window-height, 100vh) - 190px - var(--status-bar-height) - var(--navigation-bar-height)); position: relative; .approve-main-left { diff --git a/resources/assets/sass/pages/page-manage.scss b/resources/assets/sass/pages/page-manage.scss index a2b9dd0cc..9ce476a2d 100644 --- a/resources/assets/sass/pages/page-manage.scss +++ b/resources/assets/sass/pages/page-manage.scss @@ -339,7 +339,7 @@ } &.ivu-dropdown { .ivu-select-dropdown { - max-height: calc(100vh - 120px); + max-height: calc(var(--window-height, 100vh) - 120px); overflow: auto; } } diff --git a/resources/assets/sass/root.scss b/resources/assets/sass/root.scss index aab41cb8f..9192b0547 100644 --- a/resources/assets/sass/root.scss +++ b/resources/assets/sass/root.scss @@ -1,4 +1,6 @@ :root { + --window-width: 100vw; + --window-height: 100vh; --window-scroll-y: 0px; --status-bar-height: 0px; --status-bar-color: #ffffff;