Commit a052db28 authored by wenmo's avatar wenmo

sql校验bug修复

parent 22b2c348
...@@ -35,6 +35,9 @@ const StudioExplain = (props: any) => { ...@@ -35,6 +35,9 @@ const StudioExplain = (props: any) => {
} = props; } = props;
useEffect(() => { useEffect(() => {
if(!modalVisible){
return;
}
let selectsql = null; let selectsql = null;
if (current.monaco.current) { if (current.monaco.current) {
let selection = current.monaco.current.editor.getSelection(); let selection = current.monaco.current.editor.getSelection();
...@@ -55,7 +58,7 @@ const StudioExplain = (props: any) => { ...@@ -55,7 +58,7 @@ const StudioExplain = (props: any) => {
result.then(res => { result.then(res => {
setExplainData(res.datas); setExplainData(res.datas);
}) })
}, []) }, [modalVisible])
const renderFooter = () => { const renderFooter = () => {
return ( return (
......
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