style: access list
This commit is contained in:
@@ -55,7 +55,7 @@ const AccessItem: React.FC<AccessItemProps> = ({ onSelect, data }) => {
|
|||||||
<div style={{ borderRadius: 'var(--ant-table-header-border-radius)' }}>
|
<div style={{ borderRadius: 'var(--ant-table-header-border-radius)' }}>
|
||||||
<RowChildren>
|
<RowChildren>
|
||||||
<Row gutter={16} style={{ width: '100%' }}>
|
<Row gutter={16} style={{ width: '100%' }}>
|
||||||
<Col span={5}>
|
<Col span={6}>
|
||||||
<CellContent
|
<CellContent
|
||||||
style={{
|
style={{
|
||||||
paddingInline: 'var(--ant-table-cell-padding-inline)'
|
paddingInline: 'var(--ant-table-cell-padding-inline)'
|
||||||
@@ -64,8 +64,11 @@ const AccessItem: React.FC<AccessItemProps> = ({ onSelect, data }) => {
|
|||||||
<AutoTooltip ghost>qwen3-0.6b-zduxy</AutoTooltip>
|
<AutoTooltip ghost>qwen3-0.6b-zduxy</AutoTooltip>
|
||||||
</CellContent>
|
</CellContent>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={5}>
|
<Col span={3}>
|
||||||
<CellContent style={{ paddingLeft: 58 }}>
|
<CellContent>OpenAI</CellContent>
|
||||||
|
</Col>
|
||||||
|
<Col span={4}>
|
||||||
|
<CellContent>
|
||||||
{data.weight && (
|
{data.weight && (
|
||||||
<AutoTooltip ghost>
|
<AutoTooltip ghost>
|
||||||
{intl.formatMessage({ id: 'accesses.form.endpoint.weight' })}:
|
{intl.formatMessage({ id: 'accesses.form.endpoint.weight' })}:
|
||||||
@@ -81,8 +84,8 @@ const AccessItem: React.FC<AccessItemProps> = ({ onSelect, data }) => {
|
|||||||
)}
|
)}
|
||||||
</CellContent>
|
</CellContent>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={5}>
|
<Col span={3}>
|
||||||
<CellContent style={{ paddingLeft: 44 }}>
|
<CellContent>
|
||||||
<AutoTooltip ghost>
|
<AutoTooltip ghost>
|
||||||
<StatusTag
|
<StatusTag
|
||||||
statusValue={{
|
statusValue={{
|
||||||
@@ -95,14 +98,18 @@ const AccessItem: React.FC<AccessItemProps> = ({ onSelect, data }) => {
|
|||||||
</CellContent>
|
</CellContent>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={5}>
|
<Col span={5}>
|
||||||
<CellContent style={{ paddingLeft: 44 }}>
|
<CellContent style={{ marginLeft: -6 }}>
|
||||||
<AutoTooltip ghost minWidth={20}>
|
<AutoTooltip ghost minWidth={20}>
|
||||||
{dayjs().format('YYYY-MM-DD HH:mm:ss')}
|
{dayjs().format('YYYY-MM-DD HH:mm:ss')}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
</CellContent>
|
</CellContent>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={3}>
|
<Col span={3}>
|
||||||
<CellContent style={{ paddingLeft: 36 }}>
|
<CellContent
|
||||||
|
style={{
|
||||||
|
marginLeft: -12
|
||||||
|
}}
|
||||||
|
>
|
||||||
<DropdownButtons
|
<DropdownButtons
|
||||||
items={childActionList}
|
items={childActionList}
|
||||||
onSelect={onSelect}
|
onSelect={onSelect}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const Basic = () => {
|
|||||||
name="categories"
|
name="categories"
|
||||||
normalize={(value) => (value ? [value] : [])}
|
normalize={(value) => (value ? [value] : [])}
|
||||||
getValueProps={(value) => ({
|
getValueProps={(value) => ({
|
||||||
value: Array.isArray(value) ? value[0] : value
|
value: Array.isArray(value) ? value[0] || null : value
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<SealSelect
|
<SealSelect
|
||||||
|
|||||||
@@ -39,12 +39,11 @@ const MetaData = () => {
|
|||||||
const form = Form.useFormInstance<FormData>();
|
const form = Form.useFormInstance<FormData>();
|
||||||
const icon = Form.useWatch(['meta', 'icon'], form);
|
const icon = Form.useWatch(['meta', 'icon'], form);
|
||||||
|
|
||||||
const handleMetadataChange = (labels: Record<string, any>) => {
|
const handleMetadataChange = (list: string[], field: string) => {
|
||||||
form.setFieldValue('meta', labels);
|
form.setFieldValue(['meta', field], list);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUpdateImageList = (fileList: any[]) => {
|
const handleUpdateImageList = (fileList: any[]) => {
|
||||||
console.log('fileList', fileList);
|
|
||||||
if (fileList.length === 0) {
|
if (fileList.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -122,7 +121,7 @@ const MetaData = () => {
|
|||||||
label={intl.formatMessage({ id: 'resources.form.label' })}
|
label={intl.formatMessage({ id: 'resources.form.label' })}
|
||||||
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
|
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
|
||||||
dataList={[]}
|
dataList={[]}
|
||||||
onChange={handleMetadataChange}
|
onChange={(list: string[]) => handleMetadataChange(list, 'tags')}
|
||||||
></ListInput>
|
></ListInput>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item<FormData> name={['meta', 'licenses']} data-field="metadata">
|
<Form.Item<FormData> name={['meta', 'licenses']} data-field="metadata">
|
||||||
@@ -130,7 +129,7 @@ const MetaData = () => {
|
|||||||
label={intl.formatMessage({ id: 'accesses.form.metadata.license' })}
|
label={intl.formatMessage({ id: 'accesses.form.metadata.license' })}
|
||||||
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
|
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
|
||||||
dataList={[]}
|
dataList={[]}
|
||||||
onChange={handleMetadataChange}
|
onChange={(list: string[]) => handleMetadataChange(list, 'licenses')}
|
||||||
></ListInput>
|
></ListInput>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item<FormData> name={['meta', 'languages']} data-field="metadata">
|
<Form.Item<FormData> name={['meta', 'languages']} data-field="metadata">
|
||||||
@@ -138,7 +137,7 @@ const MetaData = () => {
|
|||||||
label={intl.formatMessage({ id: 'accesses.form.metadata.languages' })}
|
label={intl.formatMessage({ id: 'accesses.form.metadata.languages' })}
|
||||||
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
|
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
|
||||||
dataList={[]}
|
dataList={[]}
|
||||||
onChange={handleMetadataChange}
|
onChange={(list: string[]) => handleMetadataChange(list, 'languages')}
|
||||||
></ListInput>
|
></ListInput>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item<FormData> name={['meta', 'icon']} data-field="metadata">
|
<Form.Item<FormData> name={['meta', 'icon']} data-field="metadata">
|
||||||
|
|||||||
@@ -30,15 +30,10 @@ const useAccessColumns = (
|
|||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: intl.formatMessage({ id: 'models.form.source' }),
|
|
||||||
dataIndex: 'source',
|
|
||||||
span: 5
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: 'accesses.table.accessPoints' }),
|
title: intl.formatMessage({ id: 'accesses.table.accessPoints' }),
|
||||||
dataIndex: 'accessPoints',
|
dataIndex: 'accessPoints',
|
||||||
span: 5,
|
span: 10,
|
||||||
render: (value: number) => <span>{value}</span>
|
render: (value: number) => <span>{value}</span>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user