Selaa lähdekoodia

feat: 多iframe不渲染的不隐藏改为低层级

xyh 2 vuotta sitten
vanhempi
commit
1f732f491a

+ 1 - 1
packages/app/src/components/modal/index.module.css

@@ -136,7 +136,7 @@
   align-items: center;
   justify-content: flex-end;
   height: 40px;
-  padding: 0 10px;
+  padding: 0 24px;
   margin-bottom: -24px;
 }
 

+ 1 - 0
packages/app/src/pages/home/main/hooks.tsx

@@ -18,6 +18,7 @@ export function useTabItems() {
     return tabs.map<Tab>(function (tab) {
       return {
         ...tab,
+        forceRender: true,
         closable: tab.key !== '-1',
         animated: true,
         children: (

+ 18 - 0
packages/app/src/styles/index.css

@@ -184,6 +184,24 @@ img {
   margin-right: auto;
 }
 
+.ant-tabs-tabpane {
+  position: absolute;
+  top: 0;
+  left: 0;
+  display: block !important;
+  width: 100%;
+  height: 100%;
+  background-color: #fff;
+}
+
+.ant-tabs-tabpane-hidden {
+  z-index: -1;
+}
+
+.ant-tabs-tabpane-active {
+  z-index: 999;
+}
+
 /** antd ui增加 */
 .ant-text-btn-color-primary {
   color: var(--primary-color) !important;