1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| <template>
| <div class="iframe-container">
| <iframe :src="iframeSrc" class="iframe-content" />
| </div>
| </template>
|
| <script>
| export default {
| data() {
| return {
| // iframeSrc: 'https://www.baidu.com/index.htm'
| // iframeSrc: 'http://114.116.101.63:30800/'
| iframeSrc: '/cms/'
| }
| }
| }
| </script>
| <style scoped>
| .iframe-container {
| width: 100%;
| height: 100%;
| overflow: hidden; /* 隐藏外部容器的滚动条 */
| }
|
| .iframe-content {
| width: 100%;
| height: 100%;
| border: none;
| overflow: auto; /* 保留 iframe 的滚动条 */
| }
| </style>
|
|