diff --git a/dinky-web/src/components/CustomEditor/CodeEdit/function.tsx b/dinky-web/src/components/CustomEditor/CodeEdit/function.tsx index 934f0f385f..88f11a2d49 100644 --- a/dinky-web/src/components/CustomEditor/CodeEdit/function.tsx +++ b/dinky-web/src/components/CustomEditor/CodeEdit/function.tsx @@ -19,6 +19,7 @@ import { SuggestionInfo } from '@/types/Public/data'; +import { loader } from '@monaco-editor/react'; import * as monaco from 'monaco-editor'; import { editor, languages } from 'monaco-editor'; import keyWordJsonData from './keyword.json'; @@ -26,7 +27,6 @@ import ITextModel = editor.ITextModel; import ProviderResult = languages.ProviderResult; import CompletionList = languages.CompletionList; import CompletionItem = languages.CompletionItem; -import {loader} from "@monaco-editor/react"; // 导入 lodash loader.config({ monaco }); diff --git a/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx b/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx index fee34bcbe6..5b06eb2551 100644 --- a/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx +++ b/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx @@ -25,7 +25,7 @@ import { handleInitEditorAndLanguageOnBeforeMount } from '@/components/CustomEdi import { StateType } from '@/pages/DataStudio/model'; import { MonacoEditorOptions, SuggestionInfo } from '@/types/Public/data'; import { convertCodeEditTheme } from '@/utils/function'; -import {Editor, loader, Monaco, OnChange} from '@monaco-editor/react'; +import { Editor, loader, Monaco, OnChange } from '@monaco-editor/react'; import { connect } from '@umijs/max'; import useMemoCallback from 'rc-menu/es/hooks/useMemoCallback'; import { memo, useCallback, useRef } from 'react'; diff --git a/dinky-web/src/components/CustomEditor/CodeShow/index.tsx b/dinky-web/src/components/CustomEditor/CodeShow/index.tsx index b2a77e1107..6230f1f0b3 100644 --- a/dinky-web/src/components/CustomEditor/CodeShow/index.tsx +++ b/dinky-web/src/components/CustomEditor/CodeShow/index.tsx @@ -28,13 +28,12 @@ import { EditorLanguage } from 'monaco-editor/esm/metadata'; import FullscreenBtn from '@/components/CustomEditor/FullscreenBtn'; import { handleInitEditorAndLanguageOnBeforeMount } from '@/components/CustomEditor/function'; -import {Editor, loader, Monaco} from '@monaco-editor/react'; +import { Editor, loader, Monaco } from '@monaco-editor/react'; +import * as monaco from 'monaco-editor'; import { CSSProperties, useRef, useState } from 'react'; -import * as monaco from "monaco-editor"; loader.config({ monaco }); - export type CodeShowFormProps = { height?: string | number; width?: string; diff --git a/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx b/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx index c5f1df43ca..ce5f678e8e 100644 --- a/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx +++ b/dinky-web/src/pages/DataStudio/MiddleContainer/StudioEditor/DiffModal.tsx @@ -24,11 +24,11 @@ import { } from '@/pages/DataStudio/MiddleContainer/StudioEditor/constants'; import { convertCodeEditTheme } from '@/utils/function'; import { l } from '@/utils/intl'; -import {DiffEditor, loader} from '@monaco-editor/react'; +import { DiffEditor, loader } from '@monaco-editor/react'; import { Col, Modal, Row, Space, Table, Tabs, Typography } from 'antd'; +import * as monaco from 'monaco-editor'; import React, { memo } from 'react'; import styles from './index.less'; -import * as monaco from "monaco-editor"; loader.config({ monaco }); diff --git a/dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx b/dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx index 18374e17a1..90fdff83c4 100644 --- a/dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx +++ b/dinky-web/src/pages/DevOps/JobList/components/Overview/StatisticsCard.tsx @@ -30,12 +30,28 @@ type StatisticsCardParams = { extra?: any; divider?: boolean; atClick?: () => void; + isChecked?: boolean; // 是否选中 }; const StatisticsCard = (props: StatisticsCardParams) => { - const { title, value, icon, extra = <>, divider = true, link, atClick } = props; + const { + title, + value, + isChecked = false, + icon, + extra = <>, + divider = true, + link, + atClick + } = props; return ( <> - (atClick ? atClick() : {})} hoverable={true}> + (atClick ? atClick() : {})} + hoverable={true} + > {icon} diff --git a/dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx b/dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx index f012a719c9..ecc9530983 100644 --- a/dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx +++ b/dinky-web/src/pages/DevOps/JobList/components/Overview/index.tsx @@ -63,6 +63,7 @@ const JobOverview = (props: any) => { atClick={() => { setStatusFilter(undefined); }} + isChecked={!statusFilter} extra={