fix: downloading items display error

This commit is contained in:
jialin
2024-09-11 20:50:51 +08:00
parent 3f92ea3b24
commit 7f2f3ea664
7 changed files with 243 additions and 30 deletions
+9 -7
View File
@@ -130,7 +130,7 @@ const Models: React.FC<ModelsProps> = ({
value: modelSourceMap.huggingface_value,
key: 'huggingface',
icon: <IconFont type="icon-huggingface"></IconFont>,
onClick: () => {
onClick: (e: any) => {
setOpenDeployModal({
show: true,
width: 'calc(100vw - 220px)',
@@ -143,11 +143,13 @@ const Models: React.FC<ModelsProps> = ({
value: modelSourceMap.ollama_library_value,
key: 'ollama_library',
icon: <IconFont type="icon-ollama"></IconFont>,
onClick: () => {
setOpenDeployModal({
show: true,
width: 600,
source: modelSourceMap.ollama_library_value
onClick: (e: any) => {
setOpenDeployModal(() => {
return {
show: true,
width: 600,
source: modelSourceMap.ollama_library_value
};
});
}
}
@@ -242,7 +244,7 @@ const Models: React.FC<ModelsProps> = ({
const handleCreateModel = useCallback(async (data: FormData) => {
try {
console.log('data:', data);
console.log('data:', data, openDeployModal);
await createModel({ data });
setOpenDeployModal({
@@ -37,7 +37,7 @@ const UpdateLabels: React.FC<ViewModalProps> = (props) => {
return (
<Modal
title={intl.formatMessage({ id: 'resources.button.edittags' })}
title={intl.formatMessage({ id: 'resources.button.edit' })}
open={open}
centered={true}
onCancel={onCancel}
+3 -3
View File
@@ -10,10 +10,10 @@ import useTableSort from '@/hooks/use-table-sort';
import { convertFileSize, handleBatchRequest } from '@/utils';
import {
DeleteOutlined,
EditOutlined,
InfoCircleOutlined,
PlusOutlined,
SyncOutlined,
TagsOutlined
SyncOutlined
} from '@ant-design/icons';
import { useIntl } from '@umijs/max';
import { Button, Input, Space, Table, Tooltip, message } from 'antd';
@@ -31,7 +31,7 @@ const ActionList = [
{
label: 'common.button.edit',
key: 'edit',
icon: <TagsOutlined />
icon: <EditOutlined />
},
{
label: 'common.button.delete',