fix(style): language menu
This commit is contained in:
@@ -3,7 +3,7 @@ import useContainerScroll from '@/hooks/use-container-scorll';
|
||||
import Convert from 'ansi-to-html';
|
||||
import classNames from 'classnames';
|
||||
import hasAnsi from 'has-ansi';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { memo, useEffect, useRef, useState } from 'react';
|
||||
import './index.less';
|
||||
|
||||
interface LogsViewerProps {
|
||||
@@ -75,4 +75,4 @@ const LogsViewer: React.FC<LogsViewerProps> = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default LogsViewer;
|
||||
export default memo(LogsViewer);
|
||||
|
||||
@@ -17,6 +17,7 @@ const SealInput: React.FC<InputProps & SealFormItemProps> = (props) => {
|
||||
isInFormItems = true,
|
||||
variant,
|
||||
addAfter,
|
||||
trim = true,
|
||||
...rest
|
||||
} = props;
|
||||
const [isFocus, setIsFocus] = useState(false);
|
||||
@@ -43,7 +44,9 @@ const SealInput: React.FC<InputProps & SealFormItemProps> = (props) => {
|
||||
};
|
||||
|
||||
const handleChange = (e: any) => {
|
||||
e.target.value = e.target.value?.trim?.();
|
||||
if (trim) {
|
||||
e.target.value = e.target.value?.trim?.();
|
||||
}
|
||||
props.onChange?.(e);
|
||||
};
|
||||
|
||||
|
||||
@@ -8,4 +8,5 @@ export interface SealFormItemProps {
|
||||
extra?: React.ReactNode;
|
||||
addAfter?: React.ReactNode;
|
||||
loading?: React.ReactNode;
|
||||
trim?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user