@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
- react#useState
- antd#Space
- antd#message
- antd#Alert
- antd#Tabs
- @ant-design/icons#UserOutlined
- @ant-design/icons#WeiboCircleOutlined
- @ant-design/icons#TaobaoCircleOutlined
- @ant-design/icons#AlipayCircleOutlined
- @ant-design/icons#LockTwoTone
- @ant-design/icons#MobileTwoTone
- umi#Link
- umi#history
- umi#SelectLang
- umi#useIntl
- umi#FormattedMessage
- umi#useModel
@ant-design/icons#MailTwoTone TypeScript Examples
The following examples show how to use
@ant-design/icons#MailTwoTone.
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 ant-design-pro-V5-multitab with MIT License | 4 votes |
Login: React.FC<{}> = () => {
const [submitting, setSubmitting] = useState(false);
const [userLoginState, setUserLoginState] = useState<API.LoginStateType>({});
const [type, setType] = useState<string>('account');
const { initialState, setInitialState } = useModel('@@initialState');
const intl = useIntl();
const fetchUserInfo = async () => {
const userInfo = await initialState?.fetchUserInfo?.();
if (userInfo) {
setInitialState({
...initialState,
currentUser: userInfo,
});
}
};
const handleSubmit = async (values: LoginParamsType) => {
setSubmitting(true);
try {
// 登录
const msg = await fakeAccountLogin({ ...values, type });
if (msg.status === 'ok') {
message.success('登录成功!');
await fetchUserInfo();
goto();
return;
}
// 如果失败去设置用户错误信息
setUserLoginState(msg);
} catch (error) {
message.error('登录失败,请重试!');
}
setSubmitting(false);
};
const { status, type: loginType } = userLoginState;
return (
<div className={styles.container}>
<div className={styles.lang}>{SelectLang && <SelectLang />}</div>
<div className={styles.content}>
<div className={styles.top}>
<div className={styles.header}>
<Link to="/">
<img alt="logo" className={styles.logo} src="/logo.svg" />
<span className={styles.title}>Ant Design</span>
</Link>
</div>
<div className={styles.desc}>Ant Design 是西湖区最具影响力的 Web 设计规范</div>
</div>
<div className={styles.main}>
<ProForm
initialValues={{
autoLogin: true,
}}
submitter={{
searchConfig: {
submitText: intl.formatMessage({
id: 'pages.login.submit',
defaultMessage: '登录',
}),
},
render: (_, dom) => dom.pop(),
submitButtonProps: {
loading: submitting,
size: 'large',
style: {
width: '100%',
},
},
}}
onFinish={async (values) => {
handleSubmit(values);
}}
>
<Tabs activeKey={type} onChange={setType}>
<Tabs.TabPane
key="account"
tab={intl.formatMessage({
id: 'pages.login.accountLogin.tab',
defaultMessage: '账户密码登录',
})}
/>
<Tabs.TabPane
key="mobile"
tab={intl.formatMessage({
id: 'pages.login.phoneLogin.tab',
defaultMessage: '手机号登录',
})}
/>
</Tabs>
{status === 'error' && loginType === 'account' && (
<LoginMessage
content={intl.formatMessage({
id: 'pages.login.accountLogin.errorMessage',
defaultMessage: '账户或密码错误(admin/ant.design)',
})}
/>
)}
{type === 'account' && (
<>
<ProFormText
name="username"
fieldProps={{
size: 'large',
prefix: <UserOutlined className={styles.prefixIcon} />,
}}
placeholder={intl.formatMessage({
id: 'pages.login.username.placeholder',
defaultMessage: '用户名: admin or user',
})}
rules={[
{
required: true,
message: (
<FormattedMessage
id="pages.login.username.required"
defaultMessage="请输入用户名!"
/>
),
},
]}
/>
<ProFormText.Password
name="password"
fieldProps={{
size: 'large',
prefix: <LockTwoTone className={styles.prefixIcon} />,
}}
placeholder={intl.formatMessage({
id: 'pages.login.password.placeholder',
defaultMessage: '密码: ant.design',
})}
rules={[
{
required: true,
message: (
<FormattedMessage
id="pages.login.password.required"
defaultMessage="请输入密码!"
/>
),
},
]}
/>
</>
)}
{status === 'error' && loginType === 'mobile' && <LoginMessage content="验证码错误" />}
{type === 'mobile' && (
<>
<ProFormText
fieldProps={{
size: 'large',
prefix: <MobileTwoTone className={styles.prefixIcon} />,
}}
name="mobile"
placeholder={intl.formatMessage({
id: 'pages.login.phoneNumber.placeholder',
defaultMessage: '手机号',
})}
rules={[
{
required: true,
message: (
<FormattedMessage
id="pages.login.phoneNumber.required"
defaultMessage="请输入手机号!"
/>
),
},
{
pattern: /^1\d{10}$/,
message: (
<FormattedMessage
id="pages.login.phoneNumber.invalid"
defaultMessage="手机号格式错误!"
/>
),
},
]}
/>
<ProFormCaptcha
fieldProps={{
size: 'large',
prefix: <MailTwoTone className={styles.prefixIcon} />,
}}
captchaProps={{
size: 'large',
}}
placeholder={intl.formatMessage({
id: 'pages.login.captcha.placeholder',
defaultMessage: '请输入验证码',
})}
captchaTextRender={(timing, count) =>
timing
? `${count} ${intl.formatMessage({
id: 'pages.getCaptchaSecondText',
defaultMessage: '获取验证码',
})}`
: intl.formatMessage({
id: 'pages.login.phoneLogin.getVerificationCode',
defaultMessage: '获取验证码',
})
}
name="captcha"
rules={[
{
required: true,
message: (
<FormattedMessage
id="pages.login.captcha.required"
defaultMessage="请输入验证码!"
/>
),
},
]}
onGetCaptcha={async (mobile) => {
const result = await getFakeCaptcha(mobile);
if (result === false) {
return;
}
message.success('获取验证码成功!验证码为:1234');
}}
/>
</>
)}
<div
style={{
marginBottom: 24,
}}
>
<ProFormCheckbox noStyle name="autoLogin">
<FormattedMessage id="pages.login.rememberMe" defaultMessage="自动登录" />
</ProFormCheckbox>
<a
style={{
float: 'right',
}}
>
<FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" />
</a>
</div>
</ProForm>
<Space className={styles.other}>
<FormattedMessage id="pages.login.loginWith" defaultMessage="其他登录方式" />
<AlipayCircleOutlined className={styles.icon} />
<TaobaoCircleOutlined className={styles.icon} />
<WeiboCircleOutlined className={styles.icon} />
</Space>
</div>
</div>
<Footer />
</div>
);
}