Commit 4c5df378 authored by godkaikai's avatar godkaikai

Revert "解决sql编辑器因浏览器宽高改变而消失的问题"

This reverts commit ded7f026.
parent ded7f026
......@@ -21,14 +21,11 @@ type StudioProps = {
rightClickMenu: StateType['rightClickMenu'];
dispatch: any;
};
const elementwidth = document.documentElement.clientWidth;
const elementHeight = document.documentElement.clientHeight;
const Studio: React.FC<StudioProps> = (props) => {
const {rightClickMenu, toolHeight, toolLeftWidth,toolRightWidth, dispatch} = props;
const [form] = Form.useForm();
const VIEW = {
leftToolWidth: 300,
marginTop: 116,
......@@ -39,13 +36,13 @@ const Studio: React.FC<StudioProps> = (props) => {
midMargin: 46,
};
const [size, setSize] = useState({
width: elementwidth - 1,
height: elementHeight,
width: document.documentElement.clientWidth - 1,
height: document.documentElement.clientHeight,
});
const onResize = useCallback(() => {
setSize({
width: elementwidth - 1,
height: elementHeight,
width: document.documentElement.clientWidth - 1,
height: document.documentElement.clientHeight,
})
}, []);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment