Ver Fonte

fix: 修复聊天框 iframe 高度和权限设置

weipengtao há 6 meses atrás
pai
commit
334e096397
1 ficheiros alterados com 8 adições e 5 exclusões
  1. 8 5
      src/views/Project/Schedule.vue

+ 8 - 5
src/views/Project/Schedule.vue

@@ -100,7 +100,8 @@
       class="chat-iframe"
       :src="chatUrl"
       frameborder="0"
-      allow="microphone"
+      allow="microphone *"
+      sandbox="allow-scripts allow-same-origin allow-forms allow-popups allow-modals"
     ></iframe>
   </div>
   </div>
@@ -363,7 +364,7 @@ export default {
 .schedule-layout {
   display: flex;
   gap: 16px;
-  height: 100%;
+  height: calc(100vh - 120px);
 }
 .schedule-left {
   flex: 1;
@@ -371,14 +372,15 @@ export default {
   overflow-y: auto;
 }
 .schedule-right {
-  width: 380px;
-  min-width: 380px;
+  width: 400px;
+  min-width: 400px;
   display: flex;
   flex-direction: column;
   border: 1px solid #e4e7ed;
   border-radius: 8px;
   background: #fff;
   overflow: hidden;
+  height: 100%;
 }
 .chat-header {
   padding: 12px 16px;
@@ -387,11 +389,12 @@ export default {
   color: #333;
   border-bottom: 1px solid #e4e7ed;
   background: #f8f9fa;
+  flex-shrink: 0;
 }
 .chat-iframe {
   flex: 1;
   width: 100%;
-  min-height: 600px;
+  height: 100%;
   border: none;
 }
 </style>