@ant-design/icons APIs
- DeleteOutlined
- PlusOutlined
- SettingOutlined
- UserOutlined
- ExclamationCircleOutlined
- CloseOutlined
- DownOutlined
- SearchOutlined
- EditOutlined
- QuestionCircleOutlined
- LoadingOutlined
- CopyOutlined
- DownloadOutlined
- LogoutOutlined
- LeftOutlined
- PlusCircleOutlined
- MinusCircleOutlined
- CloseCircleOutlined
- CheckOutlined
- UploadOutlined
- ReloadOutlined
- InfoCircleOutlined
- SaveOutlined
- GithubOutlined
- LockOutlined
- RightOutlined
- CodeOutlined
- EyeOutlined
- EllipsisOutlined
- CaretRightOutlined
- CheckCircleOutlined
- SyncOutlined
- LinkOutlined
- HomeOutlined
- MenuUnfoldOutlined
- FullscreenExitOutlined
- FullscreenOutlined
- MenuOutlined
- BellOutlined
- MenuFoldOutlined
- AppstoreOutlined
- FormOutlined
- CaretDownOutlined
- UndoOutlined
- TeamOutlined
- ArrowDownOutlined
- ArrowLeftOutlined
- ClearOutlined
- RedoOutlined
- GlobalOutlined
- ExportOutlined
- ClockCircleOutlined
- PlayCircleOutlined
- MoreOutlined
- UpOutlined
- UnorderedListOutlined
- MessageOutlined
- ArrowUpOutlined
- FilterOutlined
- StarOutlined
- StopOutlined
- EyeInvisibleOutlined
- BgColorsOutlined
- WarningOutlined
- createFromIconfontCN
- MailOutlined
- ArrowRightOutlined
- AreaChartOutlined
- SendOutlined
- DatabaseOutlined
- CalendarOutlined
- VerticalAlignBottomOutlined
- PictureOutlined
- ProfileOutlined
- FileTextOutlined
- DeploymentUnitOutlined
- QuestionOutlined
- UserAddOutlined
- ApiOutlined
- AppstoreAddOutlined
- RollbackOutlined
- BoldOutlined
- ItalicOutlined
- UnderlineOutlined
- VerticalAlignTopOutlined
- SnippetsOutlined
- HighlightOutlined
- WeiboCircleOutlined
- ApartmentOutlined
- BugOutlined
- DashboardOutlined
- HistoryOutlined
- CloseCircleFilled
- SmileOutlined
- BarsOutlined
- InfoOutlined
- PhoneOutlined
- BarChartOutlined
- LineChartOutlined
- PieChartOutlined
- CommentOutlined
- UsergroupAddOutlined
- ExclamationCircleFilled
- ControlOutlined
- GoogleOutlined
- InboxOutlined
- ShareAltOutlined
- ReadOutlined
- CheckCircleFilled
- BlockOutlined
- NotificationOutlined
- DesktopOutlined
- FileOutlined
- MinusOutlined
- FieldTimeOutlined
- PlusSquareOutlined
- DiffOutlined
- AlignCenterOutlined
- ZoomInOutlined
- ZoomOutOutlined
- AlipayCircleOutlined
- FileAddOutlined
- FolderAddOutlined
- FolderOpenOutlined
- NumberOutlined
- PauseOutlined
- ContactsOutlined
- CloudSyncOutlined
- TableOutlined
- ContainerOutlined
- TagOutlined
- VideoCameraOutlined
- BookOutlined
- ToolOutlined
- SlackOutlined
- MobileOutlined
- SwapOutlined
- LockFilled
- CloudDownloadOutlined
- StarFilled
- FontSizeOutlined
- BranchesOutlined
- UpCircleOutlined
- DownCircleOutlined
- DoubleRightOutlined
- MinusSquareOutlined
- AlignLeftOutlined
- AlignRightOutlined
- SmallDashOutlined
- TaobaoCircleOutlined
- BuildOutlined
- CloudUploadOutlined
- FolderOutlined
- GroupOutlined
- Loading3QuartersOutlined
- QrcodeOutlined
- FolderFilled
- InfoCircleFilled
- PlusCircleFilled
- SmileTwoTone
- HeartTwoTone
- CheckCircleTwoTone
- EditFilled
- UserDeleteOutlined
- MacCommandOutlined
- PushpinOutlined
- CoffeeOutlined
- ProjectOutlined
- OrderedListOutlined
- FundOutlined
- RiseOutlined
- AimOutlined
- CalculatorOutlined
- GatewayOutlined
- KeyOutlined
- GitlabOutlined
- BulbOutlined
- CloseSquareOutlined
- PlaySquareOutlined
- RocketOutlined
- ClusterOutlined
- ArrowsAltOutlined
- DragOutlined
- CaretUpOutlined
- DoubleLeftOutlined
- EnterOutlined
- RetweetOutlined
- ScissorOutlined
- StrikethroughOutlined
- ColumnWidthOutlined
- DingdingOutlined
- TwitterOutlined
- QqOutlined
- ZhihuOutlined
- BorderOutlined
- CameraOutlined
- EnvironmentOutlined
- FieldNumberOutlined
- FileExcelOutlined
- FileImageOutlined
- FilePptOutlined
- FileSearchOutlined
- FormatPainterOutlined
- FunctionOutlined
- HourglassOutlined
- LayoutOutlined
- OneToOneOutlined
- PartitionOutlined
- PoweroffOutlined
- PrinterOutlined
- SafetyCertificateOutlined
- SolutionOutlined
- TagsOutlined
- UngroupOutlined
- CopyFilled
- DeleteTwoTone
- QuestionCircleFilled
- StepBackwardOutlined
- StepForwardOutlined
- CopyrightOutlined
- CrownOutlined
- ExclamationOutlined
- PaperClipOutlined
- DashOutlined
- CloseCircleTwoTone
- ExclamationCircleTwoTone
- FlagOutlined
- FunnelPlotOutlined
- InteractionOutlined
- CheckSquareOutlined
- LaptopOutlined
- CustomerServiceOutlined
- WarningFilled
- ApiTwoTone
- ApiFilled
- MergeCellsOutlined
- SlackSquareOutlined
- FallOutlined
- PercentageOutlined
- DollarOutlined
- CloudServerOutlined
- UnlockOutlined
- PicCenterOutlined
- FontColorsOutlined
- GithubFilled
- CaretLeftOutlined
- LeftCircleOutlined
- RightCircleOutlined
- VerticalAlignMiddleOutlined
- BackwardOutlined
- SwapRightOutlined
- LoginOutlined
- BorderBottomOutlined
- BorderLeftOutlined
- BorderRightOutlined
- BorderTopOutlined
- RadiusBottomleftOutlined
- RadiusBottomrightOutlined
- RadiusUpleftOutlined
- RadiusUprightOutlined
- PauseCircleOutlined
- IssuesCloseOutlined
- SortAscendingOutlined
- SortDescendingOutlined
- RadiusSettingOutlined
- ColumnHeightOutlined
- RadarChartOutlined
- BoxPlotOutlined
- WindowsOutlined
- WeiboOutlined
- WechatOutlined
- FacebookOutlined
- CodepenCircleOutlined
- AntDesignOutlined
- AliyunOutlined
- InstagramOutlined
- YuqueOutlined
- RedditOutlined
- AlertOutlined
- AudioOutlined
- AuditOutlined
- BankOutlined
- CompressOutlined
- ConsoleSqlOutlined
- CopyrightCircleOutlined
- CreditCardOutlined
- DeleteRowOutlined
- DisconnectOutlined
- ExceptionOutlined
- ExpandOutlined
- ExperimentOutlined
- FieldStringOutlined
- FileDoneOutlined
- FileProtectOutlined
- FileUnknownOutlined
- FireOutlined
- FolderViewOutlined
- FrownOutlined
- FundProjectionScreenOutlined
- FundViewOutlined
- GoldOutlined
- HddOutlined
- HeartOutlined
- InsertRowBelowOutlined
- InsertRowLeftOutlined
- LikeOutlined
- LineOutlined
- MonitorOutlined
- NodeIndexOutlined
- RotateRightOutlined
- SafetyOutlined
- SelectOutlined
- SisternodeOutlined
- SkinOutlined
- SubnodeOutlined
- SwitcherOutlined
- ThunderboltOutlined
- UserSwitchOutlined
- WalletOutlined
- FolderOpenFilled
- ProfileFilled
- HomeFilled
- DatabaseFilled
- PictureFilled
- LockTwoTone
- MailTwoTone
- MobileTwoTone
- ThunderboltFilled
- RobotFilled
- RestFilled
- DeleteFilled
- BankFilled
- SoundFilled
- CaretRightFilled
- QuestionCircleTwoTone
- SettingFilled
- EyeTwoTone
- ToolFilled
- CheckSquareFilled
- CloseSquareFilled
- RocketFilled
- PushpinFilled
- CrownFilled
- AppstoreFilled
- PlusCircleTwoTone
- AppleOutlined
- AndroidOutlined
- DropboxOutlined
- BehanceOutlined
- FastBackwardOutlined
- FastForwardOutlined
- ShrinkOutlined
- VerticalLeftOutlined
- VerticalRightOutlined
- ForwardOutlined
- SwapLeftOutlined
- UpSquareOutlined
- DownSquareOutlined
- LeftSquareOutlined
- RightSquareOutlined
- BorderHorizontalOutlined
- BorderInnerOutlined
- BorderOuterOutlined
- BorderVerticleOutlined
- PicLeftOutlined
- PicRightOutlined
- LineHeightOutlined
- DotChartOutlined
- HeatMapOutlined
- StockOutlined
- SlidersOutlined
- IeOutlined
- ChromeOutlined
- AliwangwangOutlined
- WeiboSquareOutlined
- Html5Outlined
- YoutubeOutlined
- TaobaoOutlined
- SkypeOutlined
- MediumWorkmarkOutlined
- MediumOutlined
- LinkedinOutlined
- GooglePlusOutlined
- CodepenOutlined
- CodeSandboxOutlined
- AmazonOutlined
- AlipayOutlined
- AntCloudOutlined
- BehanceSquareOutlined
- DribbbleOutlined
- DribbbleSquareOutlined
- AlibabaOutlined
- YahooOutlined
- SketchOutlined
- AccountBookOutlined
- AudioMutedOutlined
- BarcodeOutlined
- BorderlessTableOutlined
- CarOutlined
- CarryOutOutlined
- CiCircleOutlined
- CiOutlined
- CloudOutlined
- CompassOutlined
- DeleteColumnOutlined
- DeliveredProcedureOutlined
- DingtalkOutlined
- DislikeOutlined
- DollarCircleOutlined
- EuroCircleOutlined
- EuroOutlined
- ExpandAltOutlined
- FieldBinaryOutlined
- FileExclamationOutlined
- FileGifOutlined
- FileJpgOutlined
- FileMarkdownOutlined
- FilePdfOutlined
- FileSyncOutlined
- FileWordOutlined
- FileZipOutlined
- ForkOutlined
- GifOutlined
- GiftOutlined
- IdcardOutlined
- ImportOutlined
- InsertRowAboveOutlined
- InsertRowRightOutlined
- InsuranceOutlined
- ManOutlined
- MedicineBoxOutlined
- MehOutlined
- MoneyCollectOutlined
- NodeCollapseOutlined
- NodeExpandOutlined
- PayCircleOutlined
- PoundCircleOutlined
- PoundOutlined
- PropertySafetyOutlined
- PullRequestOutlined
- ReconciliationOutlined
- RedEnvelopeOutlined
- RestOutlined
- RobotOutlined
- RotateLeftOutlined
- ScanOutlined
- ScheduleOutlined
- SecurityScanOutlined
- ShakeOutlined
- ShopOutlined
- ShoppingCartOutlined
- ShoppingOutlined
- SoundOutlined
- SplitCellsOutlined
- TabletOutlined
- ToTopOutlined
- TrademarkCircleOutlined
- TrademarkOutlined
- TransactionOutlined
- TranslationOutlined
- TrophyOutlined
- UsbOutlined
- UsergroupDeleteOutlined
- VerifiedOutlined
- VideoCameraAddOutlined
- WhatsAppOutlined
- WifiOutlined
- WomanOutlined
- AlertFilled
- GoldenFilled
- MessageFilled
- BuildFilled
- PieChartFilled
- PlayCircleFilled
- StarTwoTone
- FacebookFilled
- CloudFilled
- NotificationFilled
- EyeFilled
- EyeInvisibleFilled
- SnippetsFilled
- HolderOutlined
- FilterFilled
- CreditCardFilled
- WechatFilled
- FilePdfFilled
- CaretDownFilled
- PlusSquareFilled
- TagsFilled
- BookFilled
- ContactsFilled
- TrophyTwoTone
- FundFilled
- WarningTwoTone
- SafetyCertificateFilled
- SaveFilled
- CodeFilled
- FolderAddFilled
- LinkedinFilled
- BellFilled
- FolderTwoTone
- CodeTwoTone
- DownCircleTwoTone
- UpCircleTwoTone
- ChromeFilled
- ThunderboltTwoTone
- PlaySquareTwoTone
- CompassTwoTone
Other Related APIs
@ant-design/icons#CodeTwoTone TypeScript Examples
The following examples show how to use
@ant-design/icons#CodeTwoTone.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx From anew-server with MIT License | 4 votes |
HostList: React.FC = () => {
const { initialState } = useModel('@@initialState');
if (!initialState || !initialState.DictObj) {
return null;
}
const authType: optionsType[] = initialState.DictObj.auth_type.map((item: any) => ({ label: item.dict_value, value: item.dict_key }));
const hostType: optionsType[] = initialState.DictObj.host_type.map((item: any) => ({ label: item.dict_value, value: item.dict_key }));
const [createVisible, setCreateVisible] = useState<boolean>(false);
const [updateVisible, setUpdateVisible] = useState<boolean>(false);
const [recordVisible, setRecordVisible] = useState<boolean>(false);
const actionRef = useRef<ActionType>();
const [formValues, setFormValues] = useState<API.HostList>();
const [hostGroup, setHostGroup] = useState<API.HostGroupList[]>([]);
const [group_id, setGroupId] = useState<string>();
const [hostId, setHostId] = useState<number>();
const access = useAccess();
const { consoleWin, setConsoleWin } = useModel('global');
const handleDelete = (record: API.Ids) => {
if (!record) return;
if (Array.isArray(record.ids) && !record.ids.length) return;
const content = `您是否要删除这${Array.isArray(record.ids) ? record.ids.length : ''}项?`;
Modal.confirm({
title: '注意',
content,
onOk: () => {
deleteHost(record).then((res) => {
if (res.code === 200 && res.status === true) {
message.success(res.message);
if (actionRef.current) {
actionRef.current.reload();
}
}
});
},
onCancel() { },
});
};
const saveTtys = (val: API.TtyList) => {
let hosts = JSON.parse(localStorage.getItem('TABS_TTY_HOSTS') as string)
if (hosts) {
hosts.push(val)
} else {
hosts = []
hosts.push(val)
}
localStorage.setItem('TABS_TTY_HOSTS', JSON.stringify(hosts));
}
useEffect(() => {
queryHostGroups({ all: true, not_null: true }).then((res) => {
if (Array.isArray(res.data.data)) {
setHostGroup([{ id: 0, name: '所有主机' }, ...res.data.data]);
}
});
}, []);
const columns: ProColumns<API.HostList>[] = [
{
title: '主机名',
dataIndex: 'host_name',
},
{
title: '地址',
dataIndex: 'ip_address',
},
{
title: '端口',
dataIndex: 'port',
},
{
title: '主机类型',
dataIndex: 'host_type',
valueType: 'select',
fieldProps: {
options: hostType,
},
},
{
title: '认证类型',
dataIndex: 'auth_type',
valueType: 'select',
fieldProps: {
options: authType,
},
},
{
title: '创建人',
dataIndex: 'creator',
},
{
title: '操作',
dataIndex: 'option',
valueType: 'option',
render: (_, record) => (
<>
<Tooltip title="控制台">
<CodeTwoTone
style={{ fontSize: '17px', color: 'blue' }}
onClick={() => {
let actKey = "tty1"
let hosts = JSON.parse(localStorage.getItem('TABS_TTY_HOSTS') as string) || []
if (hosts) {
actKey = "tty" + (hosts.length + 1).toString()
}
const hostsObj: API.TtyList = { hostname: record.host_name, ipaddr: record.ip_address, port: record.port, id: record.id.toString(), actKey: actKey, secKey: null }
saveTtys(hostsObj)
if (consoleWin) {
if (!consoleWin.closed) {
consoleWin.focus();
} else {
setConsoleWin(window.open('/asset/console', 'consoleTrm'));
}
} else {
setConsoleWin(window.open('/asset/console', 'consoleTrm'));
}
}}
/>
</Tooltip>
{/* <Divider type="vertical" />
<Tooltip title="详情">
<FileDoneOutlined
style={{ fontSize: '17px', color: '#52c41a' }}
onClick={() => {
setFormValues(record);
handleDescModalVisible(true);
}}
/>
</Tooltip> */}
<Divider type="vertical" />
<TableDropdown
key="actionGroup"
onSelect={(key) => {
switch (key) {
case 'delete':
handleDelete({ ids: [record.id] });
break;
case 'edit':
setFormValues(record);
setUpdateVisible(true);
break;
case 'record':
setHostId(record.id)
setRecordVisible(true);
break;
}
}}
menus={[
{ key: 'edit', name: '修改' },
{ key: 'record', name: '操作录像' },
{ key: 'delete', name: '删除' },
]}
/>
</>
),
},
];
return (
<PageHeaderWrapper>
{/* 权限控制显示内容 */}
{access.hasPerms(['admin', 'host:list']) && <ProTable
actionRef={actionRef}
rowKey="id"
toolBarRender={(action, { selectedRows }) => [
<Access accessible={access.hasPerms(['admin', 'host:create'])}>
<Button key="1" type="primary" onClick={() => setCreateVisible(true)}>
<PlusOutlined /> 新建
</Button>
</Access>,
selectedRows && selectedRows.length > 0 && (
<Access accessible={access.hasPerms(['admin', 'host:delete'])}>
<Button
key="2"
type="primary"
onClick={() => handleDelete({ ids: selectedRows.map((item) => item.id) })}
danger
>
<DeleteOutlined /> 删除
</Button>
</Access>
),
]}
tableAlertRender={({ selectedRowKeys, selectedRows }) => (
<div>
已选择{' '}
<a
style={{
fontWeight: 600,
}}
>
{selectedRowKeys.length}
</a>{' '}
项
</div>
)}
request={async (params) => queryHosts({ params }).then((res) => res.data)}
params={{ group_id, }}
columns={columns}
rowSelection={{}}
tableRender={(_, dom) => hostGroup.length > 1 ? (
<div style={{ display: 'flex', width: '100%', }}>
<Menu
onSelect={(e) => {
if (e.key === '0') {
setGroupId('');
} else {
setGroupId(e.key);
}
}}
style={{ width: 156 }}
defaultSelectedKeys={['0']}
defaultOpenKeys={['sub1']}
mode="inline"
>
<Menu.SubMenu
key="sub1"
title={
<span>
<UsergroupAddOutlined />
<span>主机分组</span>
</span>
}
>
{hostGroup &&
hostGroup.map((item) => <Menu.Item key={item.id}>{item.name}</Menu.Item>)}
</Menu.SubMenu>
</Menu>
<div style={{ flex: 1, }}>
{dom}
</div>
</div>
) : <div style={{ flex: 1, }}>
{dom}
</div>}
/>}
{createVisible && (
<CreateForm
actionRef={actionRef}
handleChange={setCreateVisible}
modalVisible={createVisible}
/>
)}
{updateVisible && (
<UpdateForm
actionRef={actionRef}
handleChange={setUpdateVisible}
modalVisible={updateVisible}
values={formValues}
/>
)}
{recordVisible && (
<RecordModal
handleChange={setRecordVisible}
modalVisible={recordVisible}
hostId={hostId}
/>
)}
</PageHeaderWrapper>
);
}