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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
| <template>
| <div class="thanks">
| <!-- <iframe
| src="http://apk.neters.club"
| id="apidoc"
| scrolling="no"
| frameborder="0"
| style="width:100%;"
| ></iframe> -->
|
| <iframe
| src="http://apk.neters.club"
| scrolling="auto"
| id="apidoc"
| width="100%"
| frameborder="0"
| ></iframe>
| </div>
| </template>
|
| <script>
| export default {
| name: "APIDoc",
| data() {
| return {};
| },
| mounted() {
| /**
| * iframe-宽高自适应显示
| */
| function changeMobsfIframe() {
| const apidoc = document.getElementById("apidoc");
| const deviceWidth = document.body.clientWidth;
| const deviceHeight = document.body.clientHeight;
| // apidoc.style.width = Number(deviceWidth) - 120 + "px"; //数字是页面布局宽度差值
| apidoc.style.height = Number(deviceHeight) - 128 + "px"; //数字是页面布局高度差
| }
|
| changeMobsfIframe();
|
| window.onresize = function() {
| changeMobsfIframe();
| };
| }
| };
| </script>
|
| <style scoped>
| .thanks {
| text-align: center;
| font-size: 30px;
| color: darkgray;
| }
| </style>
|
|