Browse Source

chore: add biome tooling and format codebase (#11572)

all-blocks
ice 5 months ago
committed by GitHub
parent
commit
a1b37b4630
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 25
      biome.json
  2. 24
      mock/listTableList.ts
  3. 6
      mock/notices.ts
  4. 63
      mock/requestRecord.mock.js
  5. 6
      mock/user.ts
  6. 1
      package.json
  7. 2
      public/scripts/loading.js
  8. 3
      src/app.tsx
  9. 24
      src/pages/account/center/components/Applications/index.tsx
  10. 5
      src/pages/account/center/components/Articles/index.tsx
  11. 39
      src/pages/account/settings/components/base.tsx
  12. 10
      src/pages/list/basic-list/index.tsx
  13. 2
      src/pages/list/mock/index.ts
  14. 62
      src/pages/list/search/articles/index.tsx
  15. 2
      src/pages/list/table-list/service.ts
  16. 58
      src/pages/user/login/__snapshots__/login.test.tsx.snap
  17. 63
      types/cache/mock/login.mock.cache.js

25
biome.json

@ -4,17 +4,17 @@
"ignoreUnknown": true,
"includes": [
"**/*",
"!**/.umi/**",
"!**/.umi-production/**",
"!**/.umi-test/**",
"!**/.umi-test-production/**",
"!**/src/services/**",
"!**/mock/**",
"!**/dist/**",
"!**/server/**",
"!**/public/**",
"!**/coverage/**",
"!**/node_modules/**",
"!**/.umi",
"!**/.umi-production",
"!**/.umi-test",
"!**/.umi-test-production",
"!**/src/services",
"!**/mock",
"!**/dist",
"!**/server",
"!**/public",
"!**/coverage",
"!**/node_modules",
"!biome.json"
]
},
@ -30,7 +30,8 @@
"noExplicitAny": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
"useExhaustiveDependencies": "off",
"useUniqueElementIds": "off"
},
"a11y": {
"noStaticElementInteractions": "off",

24
mock/listTableList.ts

@ -34,10 +34,7 @@ let tableListDataSource = genList(1, 100);
function getRule(req: Request, res: Response, u: string) {
let realUrl = u;
if (
!realUrl ||
Object.prototype.toString.call(realUrl) !== '[object String]'
) {
if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') {
realUrl = req.url;
}
const { current = 1, pageSize = 10 } = req.query;
@ -81,8 +78,7 @@ function getRule(req: Request, res: Response, u: string) {
};
if (Object.keys(filter).length > 0) {
dataSource = dataSource.filter((item) => {
return (Object.keys(filter) as Array<keyof API.RuleListItem>).some(
(key) => {
return (Object.keys(filter) as Array<keyof API.RuleListItem>).some((key) => {
if (!filter[key]) {
return true;
}
@ -90,16 +86,13 @@ function getRule(req: Request, res: Response, u: string) {
return true;
}
return false;
},
);
});
});
}
}
if (params.name) {
dataSource = dataSource.filter((data) =>
data?.name?.includes(params.name || ''),
);
dataSource = dataSource.filter((data) => data?.name?.includes(params.name || ''));
}
const result = {
data: dataSource,
@ -114,10 +107,7 @@ function getRule(req: Request, res: Response, u: string) {
function postRule(req: Request, res: Response, u: string, b: Request) {
let realUrl = u;
if (
!realUrl ||
Object.prototype.toString.call(realUrl) !== '[object String]'
) {
if (!realUrl || Object.prototype.toString.call(realUrl) !== '[object String]') {
realUrl = req.url;
}
@ -126,9 +116,7 @@ function postRule(req: Request, res: Response, u: string, b: Request) {
switch (method) {
case 'delete':
tableListDataSource = tableListDataSource.filter(
(item) => key.indexOf(item.key) === -1,
);
tableListDataSource = tableListDataSource.filter((item) => key.indexOf(item.key) === -1);
break;
case 'post':
(() => {

6
mock/notices.ts

@ -85,8 +85,7 @@ const getNotices = (_req: Request, res: Response) => {
{
id: '000000010',
title: '第三方紧急代码变更',
description:
'冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
extra: '马上到期',
status: 'urgent',
type: 'event',
@ -102,8 +101,7 @@ const getNotices = (_req: Request, res: Response) => {
{
id: '000000012',
title: 'ABCD 版本发布',
description:
'冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
description: '冠霖提交于 2017-01-06,需在 2017-01-07 前完成代码变更任务',
extra: '进行中',
status: 'processing',
type: 'event',

63
mock/requestRecord.mock.js

@ -2,8 +2,7 @@ module.exports = {
'GET /api/currentUser': {
data: {
name: 'Serati Ma',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
userid: '00000001',
email: 'antdesign@alipay.com',
signature: '海纳百川,有容乃大',
@ -34,8 +33,7 @@ module.exports = {
key: 99,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 99',
owner: '曲丽丽',
desc: '这是一段描述',
@ -49,8 +47,7 @@ module.exports = {
key: 98,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 98',
owner: '曲丽丽',
desc: '这是一段描述',
@ -64,8 +61,7 @@ module.exports = {
key: 97,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 97',
owner: '曲丽丽',
desc: '这是一段描述',
@ -79,8 +75,7 @@ module.exports = {
key: 96,
disabled: true,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 96',
owner: '曲丽丽',
desc: '这是一段描述',
@ -94,8 +89,7 @@ module.exports = {
key: 95,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 95',
owner: '曲丽丽',
desc: '这是一段描述',
@ -109,8 +103,7 @@ module.exports = {
key: 94,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 94',
owner: '曲丽丽',
desc: '这是一段描述',
@ -124,8 +117,7 @@ module.exports = {
key: 93,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 93',
owner: '曲丽丽',
desc: '这是一段描述',
@ -139,8 +131,7 @@ module.exports = {
key: 92,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 92',
owner: '曲丽丽',
desc: '这是一段描述',
@ -154,8 +145,7 @@ module.exports = {
key: 91,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 91',
owner: '曲丽丽',
desc: '这是一段描述',
@ -169,8 +159,7 @@ module.exports = {
key: 90,
disabled: true,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 90',
owner: '曲丽丽',
desc: '这是一段描述',
@ -184,8 +173,7 @@ module.exports = {
key: 89,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 89',
owner: '曲丽丽',
desc: '这是一段描述',
@ -199,8 +187,7 @@ module.exports = {
key: 88,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 88',
owner: '曲丽丽',
desc: '这是一段描述',
@ -214,8 +201,7 @@ module.exports = {
key: 87,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 87',
owner: '曲丽丽',
desc: '这是一段描述',
@ -229,8 +215,7 @@ module.exports = {
key: 86,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 86',
owner: '曲丽丽',
desc: '这是一段描述',
@ -244,8 +229,7 @@ module.exports = {
key: 85,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 85',
owner: '曲丽丽',
desc: '这是一段描述',
@ -259,8 +243,7 @@ module.exports = {
key: 84,
disabled: true,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 84',
owner: '曲丽丽',
desc: '这是一段描述',
@ -274,8 +257,7 @@ module.exports = {
key: 83,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 83',
owner: '曲丽丽',
desc: '这是一段描述',
@ -289,8 +271,7 @@ module.exports = {
key: 82,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 82',
owner: '曲丽丽',
desc: '这是一段描述',
@ -304,8 +285,7 @@ module.exports = {
key: 81,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 81',
owner: '曲丽丽',
desc: '这是一段描述',
@ -319,8 +299,7 @@ module.exports = {
key: 80,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 80',
owner: '曲丽丽',
desc: '这是一段描述',

6
mock/user.ts

@ -20,8 +20,7 @@ const { ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION } = process.env;
* current user access if is '', user need login
* pro
*/
let access =
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' ? 'admin' : '';
let access = ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site' ? 'admin' : '';
const getAccess = () => {
return access;
@ -46,8 +45,7 @@ export default {
success: true,
data: {
name: 'Serati Ma',
avatar:
'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png',
avatar: 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png',
userid: '00000001',
email: 'antdesign@alipay.com',
signature: '海纳百川,有容乃大',

1
package.json

@ -16,6 +16,7 @@
"lint": "npm run biome:lint && npm run tsc",
"lint-staged": "lint-staged",
"biome:lint": "npx @biomejs/biome lint",
"biome": "biome check --write",
"openapi": "max openapi",
"prepare": "husky",
"preview": "npm run build && max preview --port 8000",

2
public/scripts/loading.js

@ -2,7 +2,7 @@
* loading 占位
* 解决首次加载时白屏的问题
*/
(function () {
(() => {
const _root = document.querySelector('#root');
if (_root && _root.innerHTML === '') {
_root.innerHTML = `

3
src/app.tsx

@ -16,8 +16,7 @@ import defaultSettings from '../config/defaultSettings';
import { errorConfig } from './requestErrorConfig';
import '@ant-design/v5-patch-for-react-19';
const isDev =
process.env.NODE_ENV === 'development' || process.env.CI;
const isDev = process.env.NODE_ENV === 'development' || process.env.CI;
const loginPath = '/user/login';
/**

24
src/pages/account/center/components/Applications/index.tsx

@ -11,6 +11,7 @@ import React from 'react';
import type { ListItemDataType } from '../../data.d';
import { queryFakeList } from '../../service';
import useStyles from './index.style';
export function formatWan(val: number) {
const v = val * 1;
if (!v || Number.isNaN(v)) return '';
@ -35,19 +36,13 @@ export function formatWan(val: number) {
}
return result;
}
const Applications: React.FC = () => {
const { styles: stylesApplications } = useStyles();
// 获取tab列表数据
const { data: listData } = useRequest(() => {
return queryFakeList({
count: 30,
});
});
const CardInfo: React.FC<{
activeUser: React.ReactNode;
newUser: React.ReactNode;
}> = ({ activeUser, newUser }) => (
}> = ({ activeUser, newUser }) => {
const { styles: stylesApplications } = useStyles();
return (
<div className={stylesApplications.cardInfo}>
<div>
<p></p>
@ -59,6 +54,17 @@ const Applications: React.FC = () => {
</div>
</div>
);
};
const Applications: React.FC = () => {
const { styles: stylesApplications } = useStyles();
// 获取tab列表数据
const { data: listData } = useRequest(() => {
return queryFakeList({
count: 30,
});
});
return (
<List<ListItemDataType>
rowKey="id"

5
src/pages/account/center/components/Articles/index.tsx

@ -7,8 +7,6 @@ import { queryFakeList } from '../../service';
import ArticleListContent from '../ArticleListContent';
import useStyles from './index.style';
const Articles: React.FC = () => {
const { styles } = useStyles();
const IconText: React.FC<{
icon: React.ReactNode;
text: React.ReactNode;
@ -18,6 +16,9 @@ const Articles: React.FC = () => {
</span>
);
const Articles: React.FC = () => {
const { styles } = useStyles();
// 获取tab列表数据
const { data: listData } = useRequest(() => {
return queryFakeList({

39
src/pages/account/settings/components/base.tsx

@ -29,23 +29,7 @@ const validatorPhone = (
const BaseView: React.FC = () => {
const { styles } = useStyles();
// 头像组件 方便以后独立,增加裁剪之类的功能
const AvatarView = ({ avatar }: { avatar: string }) => (
<>
<div className={styles.avatar_title}></div>
<div className={styles.avatar}>
<img src={avatar} alt="avatar" />
</div>
<Upload showUploadList={false}>
<div className={styles.button_view}>
<Button>
<UploadOutlined />
</Button>
</div>
</Upload>
</>
);
const { data: currentUser, loading } = useRequest(() => {
return queryCurrent();
});
@ -232,3 +216,24 @@ const BaseView: React.FC = () => {
);
};
export default BaseView;
const AvatarView = ({ avatar }: { avatar: string }) => {
const { styles } = useStyles();
return (
<>
<div className={styles.avatar_title}></div>
<div className={styles.avatar}>
<img src={avatar} alt="avatar" />
</div>
<Upload showUploadList={false}>
<div className={styles.button_view}>
<Button>
<UploadOutlined />
</Button>
</div>
</Upload>
</>
);
};

10
src/pages/list/basic-list/index.tsx

@ -154,9 +154,9 @@ export const BasicList: FC = () => {
/>
</div>
);
const MoreBtn: React.FC<{
item: BasicListItemDataType;
}> = ({ item }) => (
const renderMoreBtn = (item: BasicListItemDataType) => {
return (
<Dropdown
menu={{
onClick: ({ key }) => editAndDelete(key, item),
@ -177,6 +177,8 @@ export const BasicList: FC = () => {
</a>
</Dropdown>
);
};
const handleDone = () => {
setDone(false);
setVisible(false);
@ -237,7 +239,7 @@ export const BasicList: FC = () => {
>
</a>,
<MoreBtn key="more" item={item} />,
renderMoreBtn(item),
]}
>
<List.Item.Meta

2
src/pages/list/mock/index.ts

@ -1,4 +1,4 @@
import { DefaultOptionType } from 'antd/es/select';
import type { DefaultOptionType } from 'antd/es/select';
export const categoryOptions: DefaultOptionType[] = Array.from({ length: 12 }).map((_, index) => ({
value: `cat${index + 1}`,

62
src/pages/list/search/articles/index.tsx

@ -21,6 +21,37 @@ const FormItem = Form.Item;
const pageSize = 5;
const IconText: React.FC<{
type: string;
text: React.ReactNode;
}> = ({ type, text }) => {
switch (type) {
case 'star-o':
return (
<span>
<StarOutlined style={{ marginRight: 8 }} />
{text}
</span>
);
case 'like-o':
return (
<span>
<LikeOutlined style={{ marginRight: 8 }} />
{text}
</span>
);
case 'message':
return (
<span>
<MessageOutlined style={{ marginRight: 8 }} />
{text}
</span>
);
default:
return null;
}
};
const Articles: FC = () => {
const [form] = Form.useForm();
@ -68,37 +99,6 @@ const Articles: FC = () => {
},
];
const IconText: React.FC<{
type: string;
text: React.ReactNode;
}> = ({ type, text }) => {
switch (type) {
case 'star-o':
return (
<span>
<StarOutlined style={{ marginRight: 8 }} />
{text}
</span>
);
case 'like-o':
return (
<span>
<LikeOutlined style={{ marginRight: 8 }} />
{text}
</span>
);
case 'message':
return (
<span>
<MessageOutlined style={{ marginRight: 8 }} />
{text}
</span>
);
default:
return null;
}
};
const formItemLayout = {
wrapperCol: {
xs: { span: 24 },

2
src/pages/list/table-list/service.ts

@ -1,5 +1,3 @@
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
import type { TableListItem } from './data';

58
src/pages/user/login/__snapshots__/login.test.tsx.snap

@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`Login Page should login success 1`] = `
<DocumentFragment>
<div
class="ant-app css-var-«r7»"
class="ant-app css-var-_r_7_"
>
<div
class="acss-trkbkn"
@ -77,14 +77,14 @@ exports[`Login Page should login success 1`] = `
>
<form
autocomplete="off"
class="ant-form ant-form-vertical css-var-«r7» ant-form-css-var ant-pro-form"
class="ant-form ant-form-vertical css-var-_r_7_ ant-form-css-var ant-pro-form"
>
<input
style="display: none;"
type="text"
/>
<div
class="ant-tabs ant-tabs-top ant-tabs-centered css-var-«r7» ant-tabs-css-var"
class="ant-tabs ant-tabs-top ant-tabs-centered css-var-_r_7_ ant-tabs-css-var"
>
<div
aria-orientation="horizontal"
@ -186,13 +186,13 @@ exports[`Login Page should login success 1`] = `
</div>
</div>
<div
class="ant-form-item css-var-«r7» ant-form-css-var ant-form-item-has-success"
class="ant-form-item css-var-_r_7_ ant-form-css-var ant-form-item-has-success ant-form-item-vertical"
>
<div
class="ant-row ant-form-item-row css-var-«r7»"
class="ant-row ant-form-item-row css-var-_r_7_"
>
<div
class="ant-col ant-form-item-control css-var-«r7»"
class="ant-col ant-form-item-control css-var-_r_7_"
>
<div
class="ant-form-item-control-input"
@ -201,7 +201,7 @@ exports[`Login Page should login success 1`] = `
class="ant-form-item-control-input-content"
>
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-outlined ant-input-status-success css-var-«r7» ant-input-css-var"
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-outlined ant-input-status-success css-var-_r_7_ ant-input-css-var"
>
<span
class="ant-input-prefix"
@ -270,13 +270,13 @@ exports[`Login Page should login success 1`] = `
</div>
</div>
<div
class="ant-form-item css-var-«r7» ant-form-css-var ant-form-item-has-success"
class="ant-form-item css-var-_r_7_ ant-form-css-var ant-form-item-has-success ant-form-item-vertical"
>
<div
class="ant-row ant-form-item-row css-var-«r7»"
class="ant-row ant-form-item-row css-var-_r_7_"
>
<div
class="ant-col ant-form-item-control css-var-«r7»"
class="ant-col ant-form-item-control css-var-_r_7_"
>
<div
class="ant-form-item-control-input"
@ -285,7 +285,7 @@ exports[`Login Page should login success 1`] = `
class="ant-form-item-control-input-content"
>
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-outlined ant-input-status-success ant-input-password ant-input-password-large css-var-«r7» ant-input-css-var"
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-outlined ant-input-status-success ant-input-password ant-input-password-large css-var-_r_7_ ant-input-css-var"
>
<span
class="ant-input-prefix"
@ -354,7 +354,7 @@ exports[`Login Page should login success 1`] = `
style="margin-bottom: 24px;"
>
<label
class="ant-checkbox-wrapper ant-checkbox-wrapper-checked css-var-«r7» ant-checkbox-css-var"
class="ant-checkbox-wrapper ant-checkbox-wrapper-checked css-var-_r_7_ ant-checkbox-css-var"
>
<span
class="ant-checkbox ant-wave-target ant-checkbox-checked"
@ -382,7 +382,7 @@ exports[`Login Page should login success 1`] = `
</a>
</div>
<button
class="ant-btn css-var-«r7» ant-btn-primary ant-btn-color-primary ant-btn-variant-solid ant-btn-lg"
class="ant-btn css-var-_r_7_ ant-btn-primary ant-btn-color-primary ant-btn-variant-solid ant-btn-lg"
style="width: 100%;"
type="button"
>
@ -458,7 +458,7 @@ exports[`Login Page should login success 1`] = `
</div>
</div>
<footer
class="ant-layout-footer css-var-«r7»"
class="ant-layout-footer css-var-_r_7_"
style="padding: 0px; background: none;"
>
<div
@ -547,7 +547,7 @@ exports[`Login Page should login success 1`] = `
exports[`Login Page should show login form 1`] = `
<DocumentFragment>
<div
class="ant-app css-var-«r0»"
class="ant-app css-var-_r_0_"
>
<div
class="acss-trkbkn"
@ -621,14 +621,14 @@ exports[`Login Page should show login form 1`] = `
>
<form
autocomplete="off"
class="ant-form ant-form-vertical css-var-«r0» ant-form-css-var ant-pro-form"
class="ant-form ant-form-vertical css-var-_r_0_ ant-form-css-var ant-pro-form"
>
<input
style="display: none;"
type="text"
/>
<div
class="ant-tabs ant-tabs-top ant-tabs-centered css-var-«r0» ant-tabs-css-var"
class="ant-tabs ant-tabs-top ant-tabs-centered css-var-_r_0_ ant-tabs-css-var"
>
<div
aria-orientation="horizontal"
@ -730,13 +730,13 @@ exports[`Login Page should show login form 1`] = `
</div>
</div>
<div
class="ant-form-item css-var-«r0» ant-form-css-var"
class="ant-form-item css-var-_r_0_ ant-form-css-var ant-form-item-vertical"
>
<div
class="ant-row ant-form-item-row css-var-«r0»"
class="ant-row ant-form-item-row css-var-_r_0_"
>
<div
class="ant-col ant-form-item-control css-var-«r0»"
class="ant-col ant-form-item-control css-var-_r_0_"
>
<div
class="ant-form-item-control-input"
@ -745,7 +745,7 @@ exports[`Login Page should show login form 1`] = `
class="ant-form-item-control-input-content"
>
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-outlined css-var-«r0» ant-input-css-var"
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-outlined css-var-_r_0_ ant-input-css-var"
>
<span
class="ant-input-prefix"
@ -814,13 +814,13 @@ exports[`Login Page should show login form 1`] = `
</div>
</div>
<div
class="ant-form-item css-var-«r0» ant-form-css-var"
class="ant-form-item css-var-_r_0_ ant-form-css-var ant-form-item-vertical"
>
<div
class="ant-row ant-form-item-row css-var-«r0»"
class="ant-row ant-form-item-row css-var-_r_0_"
>
<div
class="ant-col ant-form-item-control css-var-«r0»"
class="ant-col ant-form-item-control css-var-_r_0_"
>
<div
class="ant-form-item-control-input"
@ -829,7 +829,7 @@ exports[`Login Page should show login form 1`] = `
class="ant-form-item-control-input-content"
>
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-outlined ant-input-password ant-input-password-large css-var-«r0» ant-input-css-var"
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg ant-input-outlined ant-input-password ant-input-password-large css-var-_r_0_ ant-input-css-var"
>
<span
class="ant-input-prefix"
@ -897,7 +897,7 @@ exports[`Login Page should show login form 1`] = `
style="margin-bottom: 24px;"
>
<label
class="ant-checkbox-wrapper ant-checkbox-wrapper-checked css-var-«r0» ant-checkbox-css-var"
class="ant-checkbox-wrapper ant-checkbox-wrapper-checked css-var-_r_0_ ant-checkbox-css-var"
>
<span
class="ant-checkbox ant-wave-target ant-checkbox-checked"
@ -925,7 +925,7 @@ exports[`Login Page should show login form 1`] = `
</a>
</div>
<button
class="ant-btn css-var-«r0» ant-btn-primary ant-btn-color-primary ant-btn-variant-solid ant-btn-lg"
class="ant-btn css-var-_r_0_ ant-btn-primary ant-btn-color-primary ant-btn-variant-solid ant-btn-lg"
style="width: 100%;"
type="button"
>
@ -1001,7 +1001,7 @@ exports[`Login Page should show login form 1`] = `
</div>
</div>
<footer
class="ant-layout-footer css-var-«r0»"
class="ant-layout-footer css-var-_r_0_"
style="padding: 0px; background: none;"
>
<div

63
types/cache/mock/login.mock.cache.js

@ -2,8 +2,7 @@ module.exports = {
'GET /api/currentUser': {
data: {
name: 'Serati Ma',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
userid: '00000001',
email: 'antdesign@alipay.com',
signature: '海纳百川,有容乃大',
@ -34,8 +33,7 @@ module.exports = {
key: 99,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 99',
owner: '曲丽丽',
desc: '这是一段描述',
@ -49,8 +47,7 @@ module.exports = {
key: 98,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 98',
owner: '曲丽丽',
desc: '这是一段描述',
@ -64,8 +61,7 @@ module.exports = {
key: 97,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 97',
owner: '曲丽丽',
desc: '这是一段描述',
@ -79,8 +75,7 @@ module.exports = {
key: 96,
disabled: true,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 96',
owner: '曲丽丽',
desc: '这是一段描述',
@ -94,8 +89,7 @@ module.exports = {
key: 95,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 95',
owner: '曲丽丽',
desc: '这是一段描述',
@ -109,8 +103,7 @@ module.exports = {
key: 94,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 94',
owner: '曲丽丽',
desc: '这是一段描述',
@ -124,8 +117,7 @@ module.exports = {
key: 93,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 93',
owner: '曲丽丽',
desc: '这是一段描述',
@ -139,8 +131,7 @@ module.exports = {
key: 92,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 92',
owner: '曲丽丽',
desc: '这是一段描述',
@ -154,8 +145,7 @@ module.exports = {
key: 91,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 91',
owner: '曲丽丽',
desc: '这是一段描述',
@ -169,8 +159,7 @@ module.exports = {
key: 90,
disabled: true,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 90',
owner: '曲丽丽',
desc: '这是一段描述',
@ -184,8 +173,7 @@ module.exports = {
key: 89,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 89',
owner: '曲丽丽',
desc: '这是一段描述',
@ -199,8 +187,7 @@ module.exports = {
key: 88,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 88',
owner: '曲丽丽',
desc: '这是一段描述',
@ -214,8 +201,7 @@ module.exports = {
key: 87,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 87',
owner: '曲丽丽',
desc: '这是一段描述',
@ -229,8 +215,7 @@ module.exports = {
key: 86,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 86',
owner: '曲丽丽',
desc: '这是一段描述',
@ -244,8 +229,7 @@ module.exports = {
key: 85,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 85',
owner: '曲丽丽',
desc: '这是一段描述',
@ -259,8 +243,7 @@ module.exports = {
key: 84,
disabled: true,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 84',
owner: '曲丽丽',
desc: '这是一段描述',
@ -274,8 +257,7 @@ module.exports = {
key: 83,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 83',
owner: '曲丽丽',
desc: '这是一段描述',
@ -289,8 +271,7 @@ module.exports = {
key: 82,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 82',
owner: '曲丽丽',
desc: '这是一段描述',
@ -304,8 +285,7 @@ module.exports = {
key: 81,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/udxAbMEhpwthVVcjLXik.png',
name: 'TradeCode 81',
owner: '曲丽丽',
desc: '这是一段描述',
@ -319,8 +299,7 @@ module.exports = {
key: 80,
disabled: false,
href: 'https://ant.design',
avatar:
'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/eeHMaZBwmTvLdIwMfBpg.png',
name: 'TradeCode 80',
owner: '曲丽丽',
desc: '这是一段描述',

Loading…
Cancel
Save