mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-01-09 11:17:28 +08:00
[improvement][semantic-fe] Optimized the frontend display and code logic of visual modeling, and updated the relevant interface of the permission management module.
This commit is contained in:
@@ -49,11 +49,13 @@ export interface ISqlEditorProps {
|
||||
isRightTheme?: boolean;
|
||||
editorConfig?: IAceEditorProps;
|
||||
sizeChanged?: number;
|
||||
isFullScreen?: boolean;
|
||||
fullScreenBtnVisible?: boolean;
|
||||
onSqlChange?: (sql: string) => void;
|
||||
onChange?: (sql: string) => void;
|
||||
onSelect?: (sql: string) => void;
|
||||
onCmdEnter?: () => void;
|
||||
triggerBackToNormal?: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,10 +73,12 @@ function SqlEditor(props: ISqlEditorProps) {
|
||||
sizeChanged,
|
||||
editorConfig,
|
||||
fullScreenBtnVisible = true,
|
||||
isFullScreen = false,
|
||||
onSqlChange,
|
||||
onChange,
|
||||
onSelect,
|
||||
onCmdEnter,
|
||||
triggerBackToNormal,
|
||||
} = props;
|
||||
const resize = useCallback(
|
||||
debounce(() => {
|
||||
@@ -118,11 +122,15 @@ function SqlEditor(props: ISqlEditorProps) {
|
||||
setHintsPopover(hints);
|
||||
}, [hints]);
|
||||
|
||||
const [isSqlIdeFullScreen, setIsSqlIdeFullScreen] = useState<boolean>(false);
|
||||
const [isSqlIdeFullScreen, setIsSqlIdeFullScreen] = useState<boolean>(isFullScreen);
|
||||
|
||||
useEffect(() => {
|
||||
setIsSqlIdeFullScreen(isFullScreen);
|
||||
}, [isFullScreen]);
|
||||
|
||||
const handleNormalScreenSqlIde = () => {
|
||||
setIsSqlIdeFullScreen(false);
|
||||
// setSqlEditorHeight(getDefaultSqlEditorHeight(screenSize));
|
||||
triggerBackToNormal?.();
|
||||
};
|
||||
return (
|
||||
<div className={styles.sqlEditor} style={{ height }}>
|
||||
|
||||
Reference in New Issue
Block a user