style: model source dropdown
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { Col, Row } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import '../style/deploy-dropdown.less';
|
import '../style/deploy-dropdown.less';
|
||||||
|
|
||||||
@@ -14,12 +15,16 @@ interface DeployDropdownProps {
|
|||||||
const DeployDropdown: React.FC<DeployDropdownProps> = ({ items, onSelect }) => {
|
const DeployDropdown: React.FC<DeployDropdownProps> = ({ items, onSelect }) => {
|
||||||
return (
|
return (
|
||||||
<div className="deploy-dropdown">
|
<div className="deploy-dropdown">
|
||||||
{items.map((item) => (
|
<Row gutter={[0, 16]}>
|
||||||
<div key={item.key} onClick={() => onSelect(item)} className="item">
|
{items.map((item) => (
|
||||||
<span className="icon">{item.icon}</span>
|
<Col span={8} key={item.key}>
|
||||||
<span className="label">{item.label}</span>
|
<div key={item.key} onClick={() => onSelect(item)} className="item">
|
||||||
</div>
|
<span className="icon">{item.icon}</span>
|
||||||
))}
|
<span className="label">{item.label}</span>
|
||||||
|
</div>
|
||||||
|
</Col>
|
||||||
|
))}
|
||||||
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -237,12 +237,6 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const sourceOptions = [
|
const sourceOptions = [
|
||||||
{
|
|
||||||
label: intl.formatMessage({ id: 'menu.models.modelCatalog' }),
|
|
||||||
value: 'catalog',
|
|
||||||
key: 'catalog',
|
|
||||||
icon: <IconFont type="icon-catalog"></IconFont>
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Hugging Face',
|
label: 'Hugging Face',
|
||||||
value: modelSourceMap.huggingface_value,
|
value: modelSourceMap.huggingface_value,
|
||||||
@@ -261,6 +255,12 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
key: 'modelscope',
|
key: 'modelscope',
|
||||||
icon: <IconFont type="icon-tu2"></IconFont>
|
icon: <IconFont type="icon-tu2"></IconFont>
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: intl.formatMessage({ id: 'menu.models.modelCatalog' }),
|
||||||
|
value: 'catalog',
|
||||||
|
key: 'catalog',
|
||||||
|
icon: <IconFont type="icon-catalog"></IconFont>
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: intl.formatMessage({ id: 'models.form.localPath' }),
|
label: intl.formatMessage({ id: 'models.form.localPath' }),
|
||||||
value: modelSourceMap.local_path_value,
|
value: modelSourceMap.local_path_value,
|
||||||
|
|||||||
Reference in New Issue
Block a user