style: source icon in model result list
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
import { createFromIconfontCN } from '@ant-design/icons';
|
import { createFromIconfontCN } from '@ant-design/icons';
|
||||||
import './iconfont/iconfont.js';
|
// import './iconfont/iconfont.js';
|
||||||
|
|
||||||
const IconFont = createFromIconfontCN({
|
const IconFont = createFromIconfontCN({
|
||||||
scriptUrl: ''
|
scriptUrl: '//at.alicdn.com/t/c/font_4613488_35np53id3ax.js'
|
||||||
});
|
});
|
||||||
|
|
||||||
export default IconFont;
|
export default IconFont;
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
|||||||
{dataSource.loading ? (
|
{dataSource.loading ? (
|
||||||
<ItemFileWrapper>
|
<ItemFileWrapper>
|
||||||
{_.times(5, (index: number) => {
|
{_.times(5, (index: number) => {
|
||||||
return <FileSkeleton key={index} counts={3}></FileSkeleton>;
|
return <FileSkeleton key={index} counts={2}></FileSkeleton>;
|
||||||
})}
|
})}
|
||||||
</ItemFileWrapper>
|
</ItemFileWrapper>
|
||||||
) : dataSource.fileList.length ? (
|
) : dataSource.fileList.length ? (
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
|
import IconFont from '@/components/icon-font';
|
||||||
import { formatNumber } from '@/utils';
|
import { formatNumber } from '@/utils';
|
||||||
import {
|
import { DownloadOutlined, HeartOutlined } from '@ant-design/icons';
|
||||||
DownloadOutlined,
|
|
||||||
FolderOutlined,
|
|
||||||
HeartOutlined
|
|
||||||
} from '@ant-design/icons';
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { modelSourceMap } from '../config';
|
||||||
import { EvaluateResult } from '../config/types';
|
import { EvaluateResult } from '../config/types';
|
||||||
import '../style/hf-model-item.less';
|
import '../style/hf-model-item.less';
|
||||||
import IncompatiableInfo from './incompatiable-info';
|
import IncompatiableInfo from './incompatiable-info';
|
||||||
@@ -34,7 +32,12 @@ const HFModelItem: React.FC<HFModelItemProps> = (props) => {
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<div className="title">
|
<div className="title">
|
||||||
<FolderOutlined
|
<IconFont
|
||||||
|
type={
|
||||||
|
props.source === modelSourceMap.huggingface_value
|
||||||
|
? 'icon-huggingface1'
|
||||||
|
: 'icon-modelscope_light'
|
||||||
|
}
|
||||||
className="m-r-5"
|
className="m-r-5"
|
||||||
style={{ color: 'var(--ant-color-text-tertiary)' }}
|
style={{ color: 'var(--ant-color-text-tertiary)' }}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user