feat: add context length

This commit is contained in:
jialin
2026-01-06 17:21:32 +08:00
parent d8b3331648
commit 0f7a475ec9
23 changed files with 164 additions and 40 deletions
+3 -3
View File
@@ -48,7 +48,7 @@ const SealSlider: React.FC<SealSliderProps> = (props) => {
props.onChange?.(newValue);
};
const renderLabel = React.useMemo(() => {
const renderLabel = () => {
return (
<span
className="slider-label"
@@ -70,13 +70,13 @@ const SealSlider: React.FC<SealSliderProps> = (props) => {
)}
</span>
);
}, [label, labelWidth, description, value, max, min, step, defaultValue]);
};
return (
<SliderWrapper className="slider-wrapper">
<Wrapper
required={required}
status={checkStatus || status}
label={renderLabel}
label={renderLabel()}
isFocus={true}
variant="borderless"
>
+1 -1
View File
@@ -175,7 +175,7 @@ const SimpleSelect: React.FC<SelectProps & { ref?: any; showTags?: boolean }> =
return (
<TagWrapper
bordered={false}
variant="filled"
closable={props.closable}
onClose={props.onClose}
style={{
+6 -1
View File
@@ -231,7 +231,12 @@ const Wrapper: FC<WrapperProps> = ({
onClick={onClick}
>
{label && (
<Label $isFocus={isFocus} $hasPrefix={hasPrefix} onClick={onClick}>
<Label
$isFocus={isFocus}
$hasPrefix={hasPrefix}
onClick={onClick}
className="label-wrapper"
>
<LabelInfo
label={label}
required={required}
+4 -1
View File
@@ -6,6 +6,9 @@ const SliderWrapper = styled.div`
height: 100%;
justify-content: center;
}
.label-wrapper {
width: 100%;
}
.borderless {
background-color: transparent;
@@ -38,7 +41,7 @@ const SliderWrapper = styled.div`
.label-val {
position: absolute !important;
top: -14px;
right: -10px;
right: 0px;
width: 80px;
border-radius: var(--border-radius-base);
text-align: center;