style: source icon in model result list

This commit is contained in:
jialin
2025-07-03 11:38:19 +08:00
parent 8ac06259f5
commit e3d91f1cc7
3 changed files with 12 additions and 9 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
import { createFromIconfontCN } from '@ant-design/icons';
import './iconfont/iconfont.js';
// import './iconfont/iconfont.js';
const IconFont = createFromIconfontCN({
scriptUrl: ''
scriptUrl: '//at.alicdn.com/t/c/font_4613488_35np53id3ax.js'
});
export default IconFont;
@@ -398,7 +398,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
{dataSource.loading ? (
<ItemFileWrapper>
{_.times(5, (index: number) => {
return <FileSkeleton key={index} counts={3}></FileSkeleton>;
return <FileSkeleton key={index} counts={2}></FileSkeleton>;
})}
</ItemFileWrapper>
) : dataSource.fileList.length ? (
@@ -1,12 +1,10 @@
import IconFont from '@/components/icon-font';
import { formatNumber } from '@/utils';
import {
DownloadOutlined,
FolderOutlined,
HeartOutlined
} from '@ant-design/icons';
import { DownloadOutlined, HeartOutlined } from '@ant-design/icons';
import classNames from 'classnames';
import dayjs from 'dayjs';
import React from 'react';
import { modelSourceMap } from '../config';
import { EvaluateResult } from '../config/types';
import '../style/hf-model-item.less';
import IncompatiableInfo from './incompatiable-info';
@@ -34,7 +32,12 @@ const HFModelItem: React.FC<HFModelItemProps> = (props) => {
})}
>
<div className="title">
<FolderOutlined
<IconFont
type={
props.source === modelSourceMap.huggingface_value
? 'icon-huggingface1'
: 'icon-modelscope_light'
}
className="m-r-5"
style={{ color: 'var(--ant-color-text-tertiary)' }}
/>