Jiarenxiang | 38dcb05 | 2025-03-13 16:40:09 +0800 | [diff] [blame] | 1 | import React, { useEffect } from 'react'; |
| 2 | |
| 3 | /* * |
| 4 | * |
| 5 | * @author whiteshader@163.com |
| 6 | * @datetime 2023/02/07 |
| 7 | * |
| 8 | * */ |
| 9 | |
| 10 | const DruidInfo: React.FC = () => { |
| 11 | useEffect(() => { |
| 12 | const frame = document.getElementById('bdIframe'); |
| 13 | if (frame) { |
| 14 | const deviceWidth = document.documentElement.clientWidth; |
| 15 | const deviceHeight = document.documentElement.clientHeight; |
| 16 | frame.style.width = `${Number(deviceWidth) - 220}px`; |
| 17 | frame.style.height = `${Number(deviceHeight) - 120}px`; |
| 18 | } |
| 19 | }); |
| 20 | |
| 21 | return ( |
| 22 | <iframe |
| 23 | style={{ width: '100%', border: '0px', height: '100%' }} |
| 24 | src={`/api/druid/login.html`} |
| 25 | id="bdIframe" |
| 26 | /> |
| 27 | // </WrapContent> |
| 28 | ); |
| 29 | }; |
| 30 | |
| 31 | export default DruidInfo; |