commit
This commit is contained in:
@@ -95,6 +95,26 @@ layout("/layouts/platform_h5.html"){
|
||||
.weui-msg__icon-area {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.result-dialog .van-dialog__content {
|
||||
max-height: calc(100vh - 140px);
|
||||
overflow: hidden;
|
||||
}
|
||||
.iframe-container {
|
||||
width: 100%;
|
||||
height: calc(100vh - 190px);
|
||||
min-height: 260px;
|
||||
max-height: 520px;
|
||||
position: relative;
|
||||
margin-top: 20px;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.iframe-container iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
display: block;
|
||||
}
|
||||
/*.result-dialog .van-dialog__footer {
|
||||
display: none !important;
|
||||
}*/
|
||||
@@ -134,7 +154,7 @@ layout("/layouts/platform_h5.html"){
|
||||
@confirm="resultConfirm"
|
||||
>
|
||||
<!-- iframe容器:解决尺寸、加载状态问题 -->
|
||||
<div style="width: 100%; min-height: 400px; position: relative; margin-top: 20px">
|
||||
<div class="iframe-container">
|
||||
<!-- 加载中状态 -->
|
||||
<div v-if="iframeLoading" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f7f8fa; z-index: 1;">
|
||||
<van-loading type="spinner" color="#006DB9"></van-loading>
|
||||
@@ -142,7 +162,6 @@ layout("/layouts/platform_h5.html"){
|
||||
<!-- iframe核心:拼接完整URL,解决相对路径问题 -->
|
||||
<iframe
|
||||
:src="fullJumpUrl"
|
||||
style="width: 100%; height: 400px; border: none;"
|
||||
frameborder="0"
|
||||
scrolling="auto"
|
||||
@load="iframeLoading = false"
|
||||
@@ -306,7 +325,7 @@ layout("/layouts/platform_h5.html"){
|
||||
const iframe = document.querySelector('iframe');
|
||||
if (iframe) {
|
||||
// 如果传入了高度,用子页面的实际高度;否则用默认高度
|
||||
iframe.style.height = height || '400px';
|
||||
iframe.style.height = height || '100%';
|
||||
// 移除固定高度,改用动态值
|
||||
iframe.height = ''; // 清空原生height属性,优先用style
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user