chore: fallback checkbox

This commit is contained in:
jialin
2026-02-03 18:21:08 +08:00
parent 0b2be1e54b
commit a3dd126931
4 changed files with 18 additions and 11 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
// import './iconfont/iconfont.js'; // import './iconfont/iconfont.js';
const IconFont = createFromIconfontCN({ const IconFont = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/c/font_4613488_j0qgzymxj98.js' scriptUrl: '//at.alicdn.com/t/c/font_4613488_vh4wbvsrmif.js'
}); });
export default IconFont; export default IconFont;
+1 -1
View File
@@ -3,5 +3,5 @@ export default {
'accesses.button.add': '添加接入', 'accesses.button.add': '添加接入',
'accesses.table.accessPoints': '接入点', 'accesses.table.accessPoints': '接入点',
'accesses.table.traffic': '流量', 'accesses.table.traffic': '流量',
'accesses.table.setAsFallback': '设为备选' 'accesses.table.setAsFallback': '降级'
}; };
@@ -3,7 +3,7 @@ import DropdownButtons from '@/components/drop-down-buttons';
import IconFont from '@/components/icon-font'; import IconFont from '@/components/icon-font';
import RowChildren from '@/components/seal-table/components/row-children'; import RowChildren from '@/components/seal-table/components/row-children';
import StatusTag from '@/components/status-tag'; import StatusTag from '@/components/status-tag';
import { DeleteOutlined, StarFilled, StarOutlined } from '@ant-design/icons'; import { DeleteOutlined } from '@ant-design/icons';
import { Col, Row } from 'antd'; import { Col, Row } from 'antd';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import React from 'react'; import React from 'react';
@@ -37,7 +37,7 @@ export const childActionList = [
{ {
key: 'fallback', key: 'fallback',
label: 'accesses.table.setAsFallback', label: 'accesses.table.setAsFallback',
icon: <StarOutlined /> icon: <IconFont type="icon-shield" />
}, },
{ {
key: 'delete', key: 'delete',
@@ -61,16 +61,17 @@ const AccessItem: React.FC<AccessItemProps> = ({ onSelect, data }) => {
}} }}
> >
<AutoTooltip ghost>qwen3-0.6b-zduxy</AutoTooltip> <AutoTooltip ghost>qwen3-0.6b-zduxy</AutoTooltip>
{data.is_fallback && (
<StarFilled
style={{ color: 'var(--ant-color-warning)', marginLeft: 8 }}
/>
)}
</CellContent> </CellContent>
</Col> </Col>
<Col span={5}> <Col span={5}>
<CellContent style={{ paddingLeft: 44 }}> <CellContent style={{ paddingLeft: 44 }}>
<AutoTooltip ghost>Traffic: 20%</AutoTooltip> <AutoTooltip ghost>Weight: 20</AutoTooltip>
{data.is_fallback && (
<IconFont
type="icon-shield-filled"
style={{ color: 'var(--ant-color-warning)', marginLeft: 8 }}
/>
)}
</CellContent> </CellContent>
</Col> </Col>
<Col span={5}> <Col span={5}>
+7 -1
View File
@@ -3,7 +3,8 @@ import MetadataList from '@/components/metadata-list';
import SealCascader from '@/components/seal-form/seal-cascader'; import SealCascader from '@/components/seal-form/seal-cascader';
import SealInput from '@/components/seal-form/seal-input'; import SealInput from '@/components/seal-form/seal-input';
import { useIntl } from '@umijs/max'; import { useIntl } from '@umijs/max';
import { Form } from 'antd'; import { Checkbox, Form } from 'antd';
import { Tooltip } from 'antd/lib';
import _ from 'lodash'; import _ from 'lodash';
import { useState } from 'react'; import { useState } from 'react';
import { FormData } from '../config/types'; import { FormData } from '../config/types';
@@ -160,6 +161,11 @@ const Endpoints = () => {
style={{ flex: 60 }} style={{ flex: 60 }}
placeholder="weight" placeholder="weight"
></SealInput.Number> ></SealInput.Number>
<Tooltip title="fallback">
<Checkbox
style={{ marginLeft: 12, marginRight: 4 }}
></Checkbox>
</Tooltip>
</> </>
)} )}
</MetadataList> </MetadataList>