blob: adcc96806648fececf47beeafe1b890eaada0fec [file] [log] [blame]
86133aaa3f5d2025-04-20 21:33:29 +08001import React, { useEffect } from 'react';
2
3/**
4 *
5 * @author whiteshader@163.com
6 *
7 * */
8
9const CacheInfo: React.FC = () => {
10 useEffect(() => {
11 const frame = document.getElementById('bdIframe');
12 if (frame) {
13 const deviceWidth = document.documentElement.clientWidth;
14 const deviceHeight = document.documentElement.clientHeight;
15 frame.style.width = `${Number(deviceWidth) - 260}px`;
16 frame.style.height = `${Number(deviceHeight) - 120}px`;
17 }
18 });
19
20 return (
21 <div style={{}}>
22 <iframe
23 style={{ width: '100%', border: '0px', height: '100%' }}
24 src={`/api/swagger-ui/index.html`}
25 id="bdIframe"
26 />
27 </div>
28 );
29};
30
31export default CacheInfo;