style: modal style gap

This commit is contained in:
jialin
2024-08-16 12:03:48 +08:00
parent 1d92571d09
commit 7ff21e0d68
12 changed files with 58 additions and 21 deletions
@@ -339,7 +339,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
onCancel={onCancel}
onOk={handleSumit}
style={{
padding: '16px 20px',
padding: '16px 24px',
display: 'flex',
justifyContent: 'flex-end'
}}
@@ -352,7 +352,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
form={form}
onFinish={onOk}
preserve={false}
style={{ padding: '16px 20px' }}
style={{ padding: '16px 24px' }}
>
<Form.Item<FormData>
name="name"
@@ -1,7 +1,7 @@
import { convertFileSize } from '@/utils';
import { SearchOutlined } from '@ant-design/icons';
import { useIntl } from '@umijs/max';
import { Col, Empty, Row, Space, Spin } from 'antd';
import { Col, Empty, Row, Space, Spin, Tag } from 'antd';
import classNames from 'classnames';
import _ from 'lodash';
import { useEffect, useState } from 'react';
@@ -58,7 +58,7 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
}
console.log('quanType', quanType, FileType[quanType]);
if (FileType[quanType] !== undefined) {
return <span className="tag-item">{quanType}</span>;
return <Tag className="tag-item">{quanType}</Tag>;
}
return null;
};
@@ -78,7 +78,7 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
<TitleWrapper>
<span>Available Files ({dataSource.fileList.length || 0})</span>
</TitleWrapper>
<div style={{ padding: '16px 20px' }}>
<div style={{ padding: '16px 24px' }}>
<Spin spinning={dataSource.loading} style={{ minHeight: 100 }}>
{dataSource.fileList.length ? (
<Row gutter={[16, 24]}>
@@ -95,9 +95,20 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
>
<div className="title">{item.path}</div>
<Space className="tags">
<span className="tag-item">
{/* <span className="tag-item">
{convertFileSize(item.size)}
</span>
</span> */}
<Tag
className="tag-item"
color="geekblue"
style={{
marginRight: 0
}}
>
<span style={{ opacity: 0.65 }}>
{convertFileSize(item.size)}
</span>
</Tag>
{getModelQuantizationType(item)}
</Space>
<div className="btn">
@@ -42,6 +42,7 @@ const HFModelItem: React.FC<HFModelItemProps> = (props) => {
<Space size={16}>
{props.task && (
<Tag
className="tag-item"
color="geekblue"
style={{
marginRight: 0
@@ -32,7 +32,7 @@ const SearchResult: React.FC<SearchResultProps> = (props) => {
<Spin spinning={props.loading}>
<div style={{ minHeight: 200 }}>
{resultList.length ? (
<Row gutter={[16, 16]}>
<Row gutter={[16, 24]}>
{resultList.map((item, index) => (
<Col span={24} key={item.name}>
<div