chore: user mdoels

This commit is contained in:
jialin
2025-09-16 11:26:17 +08:00
parent 33df825b73
commit 4711c848f8
2 changed files with 39 additions and 0 deletions
@@ -0,0 +1,20 @@
import Card from '@/components/templates/card';
import React from 'react';
const ModelItem: React.FC<{ model: any; onDeploy: (model: any) => void }> = (
props
) => {
const { model, onDeploy } = props;
return (
<Card>
<div className="model-item" onClick={() => onDeploy(model)}>
<h3>{model.name}</h3>
<p>{model.description}</p>
<span>Deploy</span>
</div>
</Card>
);
};
export default ModelItem;
+19
View File
@@ -2,6 +2,7 @@ import { FilterBar } from '@/components/page-tools';
import { PageContainer } from '@ant-design/pro-components';
import { useIntl } from '@umijs/max';
import React from 'react';
import ModelItem from './components/model-item';
const UserModels: React.FC = () => {
const intl = useIntl();
@@ -12,6 +13,15 @@ const UserModels: React.FC = () => {
const handleInputChange = () => {};
const handleOnDeploy = (model: any) => {
// Implement deploy functionality here
console.log('Deploying model:', model);
};
const renderCard = (data: any) => {
return <ModelItem model={data} onDeploy={handleOnDeploy} />;
};
return (
<PageContainer
ghost
@@ -36,6 +46,15 @@ const UserModels: React.FC = () => {
handleSearch={handleSearch}
width={{ input: 200 }}
></FilterBar>
{/* <CardList
dataList={dataSource.dataList}
loading={dataSource.loading}
onDeploy={handleOnDeploy}
activeId={-1}
isFirst={isFirst}
Skeleton={CatalogSkelton}
renderItem={renderCard}
></CardList> */}
</PageContainer>
);
};