Преглед на файлове

优化tag全屏为页签内区域

RuoYi преди 2 месеца
родител
ревизия
d3831bf455
променени са 2 файла, в които са добавени 13 реда и са изтрити 2 реда
  1. 9 1
      ruoyi-ui/src/layout/components/AppMain.vue
  2. 4 1
      ruoyi-ui/src/layout/components/TagsView/index.vue

+ 9 - 1
ruoyi-ui/src/layout/components/AppMain.vue

@@ -51,6 +51,14 @@ export default {
   width: 100%;
   position: relative;
   overflow: hidden;
+
+  &:fullscreen,
+  &:-webkit-full-screen,
+  &:-moz-full-screen,
+  &:-ms-fullscreen {
+    background: #fff;
+    overflow-y: auto;
+  }
 }
 
 .fixed-header + .app-main {
@@ -129,4 +137,4 @@ export default {
   background-color: #c0c0c0;
   border-radius: 3px;
 }
-</style>
+</style>

+ 4 - 1
ruoyi-ui/src/layout/components/TagsView/index.vue

@@ -223,7 +223,10 @@ export default {
     },
     toggleFullscreen() {
       if (!document.fullscreenElement) {
-        document.documentElement.requestFullscreen()
+        const appMain = document.querySelector('.app-main')
+        if (appMain) {
+          appMain.requestFullscreen()
+        }
       } else {
         document.exitFullscreen()
       }