Iframe-PlotlyJs-Comp.vue

This commit is contained in:
严浩
2025-04-18 12:05:53 +08:00
parent ebed0cf4bf
commit 1f959b1d1b
3 changed files with 50 additions and 36 deletions

View File

@ -11,7 +11,8 @@ XXX: Plotly 需要用 iframe 嵌套在页面中的原因:
<script src="./plotly-3.0.1.js"></script>
</head>
<body>
<div id="PLOTLY_CHART" style="width: 100%; height: 100%"></div>
<div id="PLOTLY_CHART_spectrogram" style="width: 100%; height: 100%"></div>
<div id="PLOTLY_CHART_waterfall" style="width: 100%; height: 100%"></div>
</body>
<style>
html,
@ -24,9 +25,11 @@ XXX: Plotly 需要用 iframe 嵌套在页面中的原因:
}
/* 确保容器占满整个 iframe */
body > div {
width: 100%;
height: 100%;
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
</style>
</html>