feat: add extended_kv_cache

This commit is contained in:
jialin
2025-10-14 20:09:43 +08:00
parent 620c113fae
commit 83403a1a1a
13 changed files with 277 additions and 142 deletions
+12 -4
View File
@@ -1,3 +1,4 @@
import IconFont from '@/components/icon-font';
import { isNotEmptyValue } from '@/utils/index';
import { useIntl } from '@umijs/max';
import type { CascaderAutoProps } from 'antd';
@@ -33,10 +34,11 @@ const renderTag = (props: any) => {
const OptionNodes = (props: {
data: any;
notFoundContent?: React.ReactNode;
optionNode: React.FC<{ data: any }>;
}) => {
const intl = useIntl();
const { data, optionNode: OptionNode } = props;
const { data, optionNode: OptionNode, notFoundContent } = props;
if (data.value === '__EMPTY__') {
return (
<Empty
@@ -48,9 +50,12 @@ const OptionNodes = (props: {
justifyContent: 'center',
alignItems: 'center'
}}
description={intl.formatMessage({
id: 'common.search.empty'
})}
description={
notFoundContent ||
intl.formatMessage({
id: 'common.search.empty'
})
}
></Empty>
);
}
@@ -85,6 +90,7 @@ const SealCascader: React.FC<
allowNull,
isInFormItems = true,
optionNode,
notFoundContent,
tagRender,
...rest
} = props;
@@ -168,11 +174,13 @@ const SealCascader: React.FC<
>
<Cascader
{...rest}
suffixIcon={<IconFont type="icon-down"></IconFont>}
optionRender={
optionNode
? (data) => (
<OptionNodes
data={data}
notFoundContent={notFoundContent}
optionNode={optionNode}
></OptionNodes>
)
@@ -158,6 +158,7 @@ const Inner = styled.div.attrs({
className: '__inner__'
})`
width: 100%;
display: flex;
`;
const Extra = styled.div`
@@ -10,6 +10,9 @@ const SliderWrapper = styled.div`
.borderless {
background-color: transparent;
}
.ant-slider {
flex: 1;
}
padding-block: 0;
padding-inline: 2px;
input.ant-input-number-input {