style: access list

This commit is contained in:
jialin
2026-02-03 18:21:08 +08:00
parent 35918d2a00
commit d86d061f97
4 changed files with 21 additions and 20 deletions
@@ -55,7 +55,7 @@ const AccessItem: React.FC<AccessItemProps> = ({ onSelect, data }) => {
<div style={{ borderRadius: 'var(--ant-table-header-border-radius)' }}>
<RowChildren>
<Row gutter={16} style={{ width: '100%' }}>
<Col span={5}>
<Col span={6}>
<CellContent
style={{
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>
</CellContent>
</Col>
<Col span={5}>
<CellContent style={{ paddingLeft: 58 }}>
<Col span={3}>
<CellContent>OpenAI</CellContent>
</Col>
<Col span={4}>
<CellContent>
{data.weight && (
<AutoTooltip ghost>
{intl.formatMessage({ id: 'accesses.form.endpoint.weight' })}:
@@ -81,8 +84,8 @@ const AccessItem: React.FC<AccessItemProps> = ({ onSelect, data }) => {
)}
</CellContent>
</Col>
<Col span={5}>
<CellContent style={{ paddingLeft: 44 }}>
<Col span={3}>
<CellContent>
<AutoTooltip ghost>
<StatusTag
statusValue={{
@@ -95,14 +98,18 @@ const AccessItem: React.FC<AccessItemProps> = ({ onSelect, data }) => {
</CellContent>
</Col>
<Col span={5}>
<CellContent style={{ paddingLeft: 44 }}>
<CellContent style={{ marginLeft: -6 }}>
<AutoTooltip ghost minWidth={20}>
{dayjs().format('YYYY-MM-DD HH:mm:ss')}
</AutoTooltip>
</CellContent>
</Col>
<Col span={3}>
<CellContent style={{ paddingLeft: 36 }}>
<CellContent
style={{
marginLeft: -12
}}
>
<DropdownButtons
items={childActionList}
onSelect={onSelect}
+1 -1
View File
@@ -20,7 +20,7 @@ const Basic = () => {
name="categories"
normalize={(value) => (value ? [value] : [])}
getValueProps={(value) => ({
value: Array.isArray(value) ? value[0] : value
value: Array.isArray(value) ? value[0] || null : value
})}
>
<SealSelect
+5 -6
View File
@@ -39,12 +39,11 @@ const MetaData = () => {
const form = Form.useFormInstance<FormData>();
const icon = Form.useWatch(['meta', 'icon'], form);
const handleMetadataChange = (labels: Record<string, any>) => {
form.setFieldValue('meta', labels);
const handleMetadataChange = (list: string[], field: string) => {
form.setFieldValue(['meta', field], list);
};
const handleUpdateImageList = (fileList: any[]) => {
console.log('fileList', fileList);
if (fileList.length === 0) {
return;
}
@@ -122,7 +121,7 @@ const MetaData = () => {
label={intl.formatMessage({ id: 'resources.form.label' })}
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
dataList={[]}
onChange={handleMetadataChange}
onChange={(list: string[]) => handleMetadataChange(list, 'tags')}
></ListInput>
</Form.Item>
<Form.Item<FormData> name={['meta', 'licenses']} data-field="metadata">
@@ -130,7 +129,7 @@ const MetaData = () => {
label={intl.formatMessage({ id: 'accesses.form.metadata.license' })}
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
dataList={[]}
onChange={handleMetadataChange}
onChange={(list: string[]) => handleMetadataChange(list, 'licenses')}
></ListInput>
</Form.Item>
<Form.Item<FormData> name={['meta', 'languages']} data-field="metadata">
@@ -138,7 +137,7 @@ const MetaData = () => {
label={intl.formatMessage({ id: 'accesses.form.metadata.languages' })}
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
dataList={[]}
onChange={handleMetadataChange}
onChange={(list: string[]) => handleMetadataChange(list, 'languages')}
></ListInput>
</Form.Item>
<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' }),
dataIndex: 'accessPoints',
span: 5,
span: 10,
render: (value: number) => <span>{value}</span>
},
{