Browse Source

chore: prettier code

pull/11323/head
afc163 2 years ago
parent
commit
20a5687ecd
  1. 2
      README.es-ES.md
  2. 2
      mock/listTableList.ts
  3. 1
      package.json
  4. 5
      src/app.tsx
  5. 4
      src/components/HeaderDropdown/index.tsx
  6. 1
      src/components/RightContent/index.tsx
  7. 2
      src/components/index.ts
  8. 1
      src/pages/TableList/index.tsx
  9. 6
      src/pages/User/Login/index.tsx
  10. 4
      src/pages/User/Login/login.test.tsx
  11. 6
      src/services/ant-design-pro/api.ts

2
README.es-ES.md

@ -87,6 +87,7 @@ Proporcionamos `pro-cli` para inicializar rápidamente la estructura del proyect
npm i @ant-design/pro-cli -g
pro create myapp
```
Selecciona la versión de umi
```
@ -95,6 +96,7 @@ Selecciona la versión de umi
umi@3
```
> Si seleccionas la versión umi@4, los bloques completos aún no son compatibles.
Si eliges umi@3, también puedes elegir la plantilla "pro". "Pro" es la plantilla básica, que solo proporciona el contenido básico de la operación del marco. "Complete" contiene todos los bloques, lo cual no es adecuado para el desarrollo secundario como una plantilla básica.

2
mock/listTableList.ts

@ -1,5 +1,5 @@
import { Request, Response } from 'express';
import dayjs from 'dayjs';
import { Request, Response } from 'express';
import { parse } from 'url';
// mock tableListDataSource

1
package.json

@ -3,6 +3,7 @@
"version": "6.0.0",
"private": true,
"description": "An out-of-box UI solution for enterprise applications",
"repository": "git@github.com:ant-design/ant-design-pro.git",
"scripts": {
"analyze": "cross-env ANALYZE=1 max build",
"build": "max build",

5
src/app.tsx

@ -1,4 +1,5 @@
import { Footer, Question, SelectLang, AvatarDropdown, AvatarName } from '@/components';
import { AvatarDropdown, AvatarName, Footer, Question, SelectLang } from '@/components';
import { currentUser as queryCurrentUser } from '@/services/ant-design-pro/api';
import { LinkOutlined } from '@ant-design/icons';
import type { Settings as LayoutSettings } from '@ant-design/pro-components';
import { SettingDrawer } from '@ant-design/pro-components';
@ -6,8 +7,6 @@ import type { RunTimeLayoutConfig } from '@umijs/max';
import { history, Link } from '@umijs/max';
import defaultSettings from '../config/defaultSettings';
import { errorConfig } from './requestErrorConfig';
import { currentUser as queryCurrentUser } from '@/services/ant-design-pro/api';
import React from 'react';
const isDev = process.env.NODE_ENV === 'development';
const loginPath = '/user/login';

4
src/components/HeaderDropdown/index.tsx

@ -1,8 +1,8 @@
import { Dropdown } from 'antd';
import type { DropDownProps } from 'antd/es/dropdown';
import React from 'react';
import { createStyles } from 'antd-style';
import type { DropDownProps } from 'antd/es/dropdown';
import classNames from 'classnames';
import React from 'react';
const useStyles = createStyles(({ token }) => {
return {

1
src/components/RightContent/index.tsx

@ -1,6 +1,5 @@
import { QuestionCircleOutlined } from '@ant-design/icons';
import { SelectLang as UmiSelectLang } from '@umijs/max';
import React from 'react';
export type SiderTheme = 'light' | 'dark';

2
src/components/index.ts

@ -9,4 +9,4 @@ import Footer from './Footer';
import { Question, SelectLang } from './RightContent';
import { AvatarDropdown, AvatarName } from './RightContent/AvatarDropdown';
export { Footer, Question, SelectLang, AvatarDropdown, AvatarName };
export { AvatarDropdown, AvatarName, Footer, Question, SelectLang };

1
src/pages/TableList/index.tsx

@ -116,7 +116,6 @@ const TableList: React.FC = () => {
/>
),
dataIndex: 'name',
tip: 'The rule name is the unique key',
render: (dom, entity) => {
return (
<a

6
src/pages/User/Login/index.tsx

@ -15,12 +15,12 @@ import {
ProFormCheckbox,
ProFormText,
} from '@ant-design/pro-components';
import { FormattedMessage, history, SelectLang, useIntl, useModel, Helmet } from '@umijs/max';
import { FormattedMessage, Helmet, history, SelectLang, useIntl, useModel } from '@umijs/max';
import { Alert, message, Tabs } from 'antd';
import Settings from '../../../../config/defaultSettings';
import { createStyles } from 'antd-style';
import React, { useState } from 'react';
import { flushSync } from 'react-dom';
import { createStyles } from 'antd-style';
import Settings from '../../../../config/defaultSettings';
const useStyles = createStyles(({ token }) => {
return {

4
src/pages/User/Login/login.test.tsx

@ -1,6 +1,6 @@
import { render, fireEvent, act } from '@testing-library/react';
import { TestBrowser } from '@@/testBrowser';
import { act, fireEvent, render } from '@testing-library/react';
import React from 'react';
import { TestBrowser } from '@@/testBrowser';
// @ts-ignore
import { startMock } from '@@/requestRecordMock';

6
src/services/ant-design-pro/api.ts

@ -67,7 +67,7 @@ export async function updateRule(options?: { [key: string]: any }) {
data: {
method: 'update',
...(options || {}),
}
},
});
}
@ -78,7 +78,7 @@ export async function addRule(options?: { [key: string]: any }) {
data: {
method: 'post',
...(options || {}),
}
},
});
}
@ -89,6 +89,6 @@ export async function removeRule(options?: { [key: string]: any }) {
data: {
method: 'delete',
...(options || {}),
}
},
});
}

Loading…
Cancel
Save