diff --git a/src/components/icon-font/icons.ts b/src/components/icon-font/icons.ts index 9839fa64..04c540d5 100644 --- a/src/components/icon-font/icons.ts +++ b/src/components/icon-font/icons.ts @@ -43,6 +43,7 @@ const icons = { TencentCloud: React.createElement(IconFont, { type: 'icon-tencentcloud' }), Nvidia: React.createElement(IconFont, { type: 'icon-nvidia' }), Ascend: React.createElement(IconFont, { type: 'icon-ascend' }), + Catalog1: React.createElement(IconFont, { type: 'icon-catalog1' }), AMD: React.createElement(IconFont, { type: 'icon-amd' }), KubernetesFilled: React.createElement(IconFont, { type: 'icon-k8s-filled' }) }; diff --git a/src/components/seal-form/auto-complete.tsx b/src/components/seal-form/auto-complete.tsx index e236e33d..b08dd006 100644 --- a/src/components/seal-form/auto-complete.tsx +++ b/src/components/seal-form/auto-complete.tsx @@ -1,10 +1,8 @@ import { AutoComplete, Form, Spin } from 'antd'; import type { AutoCompleteProps } from 'antd/lib'; -import classNames from 'classnames'; import React, { useEffect, useRef, useState } from 'react'; import { SealFormItemProps } from './types'; import Wrapper from './wrapper'; -import AutoCompleteLabel from './wrapper/auto-complete-label'; import SelectWrapper from './wrapper/select'; const SealAutoComplete: React.FC< @@ -26,7 +24,6 @@ const SealAutoComplete: React.FC< ...rest } = props; const [isFocus, setIsFocus] = useState(false); - const [_isFocus_, _setIsFocus_] = useState(false); const inputRef = useRef(null); let status = ''; if (isInFormItems) { @@ -44,7 +41,6 @@ const SealAutoComplete: React.FC< if (!props.disabled && !isFocus) { inputRef.current?.focus?.(); setIsFocus(true); - _setIsFocus_(true); } }; @@ -53,20 +49,17 @@ const SealAutoComplete: React.FC< if (trim) { value = value?.trim?.(); } - _setIsFocus_(false); props.onChange?.(value, option); }; const handleOnFocus = (e: any) => { setIsFocus(true); - _setIsFocus_(true); props.onFocus?.(e); }; const handleOnBlur = (e: any) => { if (!props.value) { setIsFocus(false); - _setIsFocus_(false); } e.target.value = e.target.value?.trim?.(); props.onBlur?.(e); @@ -86,39 +79,6 @@ const SealAutoComplete: React.FC< return addAfter; }; - const renderAutoCompleteLabel = () => { - console.log( - 'renderAutoCompleteLabel===', - props.value, - props.showSearch, - _isFocus_, - isFocus - ); - if (!props.showSearch || _isFocus_) { - return null; - } - let selectItem: { - label: React.ReactNode; - value: string | number; - } = props.options?.find((item: any) => item.value === props.value) as { - label: React.ReactNode; - value: string | number; - }; - - if (!selectItem) { - selectItem = { label: props.value, value: props.value }; - } - return ( - - {props.labelRender ? props.labelRender(selectItem) : selectItem.label} - - ); - }; - return ( { {currentStep === startStep && ( = forwardRef((props, ref) => { showSearch allowClear onChange={handleOsImageChange} - filterOption={filterImageOption} optionRender={(option) => RenderOption({ ...option, diff --git a/src/pages/cluster-management/components/provider-catalog.tsx b/src/pages/cluster-management/components/provider-catalog.tsx index d5e69987..750c0b03 100644 --- a/src/pages/cluster-management/components/provider-catalog.tsx +++ b/src/pages/cluster-management/components/provider-catalog.tsx @@ -36,6 +36,7 @@ interface ProviderCatalogProps { cols?: number; current?: ProviderType | string; clickable?: boolean; + height: string | number; dataList: { label: string; key: string; @@ -52,6 +53,7 @@ const ProviderCatalog: React.FC = ({ cols = 3, dataList, clickable, + height, current }) => { const intl = useIntl(); @@ -77,7 +79,7 @@ const ProviderCatalog: React.FC = ({ {items?.map((action) => ( onSelect?.(action.key as string, action)} active={current === action.key} diff --git a/src/pages/cluster-management/components/support-gpus.tsx b/src/pages/cluster-management/components/support-gpus.tsx index 613d400a..9253d1c8 100644 --- a/src/pages/cluster-management/components/support-gpus.tsx +++ b/src/pages/cluster-management/components/support-gpus.tsx @@ -112,6 +112,7 @@ const SupportedHardware: React.FC = ({ return (