Browse Source

docs: update snapshot

pull/11096/head
期贤 2 years ago
parent
commit
0db71a03c3
  1. 2
      README.es-ES.md
  2. 14
      package.json
  3. 25722
      pnpm-lock.yaml
  4. 3
      src/app.tsx
  5. 4
      src/components/HeaderDropdown/index.tsx
  6. 1
      src/pages/dashboard/workplace/style.style.ts
  7. 8
      src/pages/list/search/applications/index.tsx
  8. 20
      src/pages/list/search/articles/index.tsx
  9. 3
      src/pages/list/search/index.tsx
  10. 10
      src/pages/list/search/projects/index.tsx
  11. 2
      src/pages/user/login/index.tsx

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.

14
package.json

@ -39,14 +39,14 @@
],
"dependencies": {
"@ant-design/icons": "^4.8.1",
"@ant-design/plots": "^2.1.0",
"@ant-design/pro-components": "^2.6.43",
"@ant-design/plots": "^2.1.1",
"@ant-design/pro-components": "^2.6.44",
"@antv/l7": "^2.20.5",
"@antv/l7-maps": "^2.20.5",
"@antv/l7-react": "^2.4.3",
"@umijs/route-utils": "^2.2.2",
"antd": "^5.12.1",
"antd-style": "^3.5.2",
"antd": "^5.12.2",
"antd-style": "^3.6.1",
"classnames": "^2.3.2",
"dayjs": "^1.11.10",
"numeral": "^2.0.6",
@ -67,7 +67,7 @@
"@types/jest": "^29.5.11",
"@types/lodash": "^4.14.202",
"@types/lodash.debounce": "^4.0.9",
"@types/react": "^18.2.42",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.17",
"@types/react-helmet": "^6.1.11",
"@umijs/fabric": "^2.14.1",
@ -81,13 +81,13 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"mockjs": "^1.1.0",
"prettier": "^3.1.0",
"prettier": "^3.1.1",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-packagejson": "^2.4.7",
"prettier-plugin-two-style-order": "^1.0.1",
"react-dev-inspector": "^1.9.0",
"swagger-ui-dist": "^4.19.1",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"typescript": "^4.9.5",
"umi-presets-pro": "^2.0.3"
},

25722
pnpm-lock.yaml

File diff suppressed because it is too large

3
src/app.tsx

@ -1,4 +1,4 @@
import { Footer, Question, SelectLang, AvatarDropdown, AvatarName } from '@/components';
import { AvatarDropdown, AvatarName, Footer, Question, SelectLang } from '@/components';
import { LinkOutlined } from '@ant-design/icons';
import type { Settings as LayoutSettings } from '@ant-design/pro-components';
import { SettingDrawer } from '@ant-design/pro-components';
@ -7,7 +7,6 @@ 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/pages/dashboard/workplace/style.style.ts

@ -175,6 +175,7 @@ const useStyles = createStyles(({ token }) => {
marginTop: '8px',
overflow: 'hidden',
fontSize: '12px',
gap: 'epx',
lineHeight: '20px',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',

8
src/pages/list/search/applications/index.tsx

@ -9,12 +9,12 @@ import { Avatar, Card, Col, Dropdown, Form, List, Row, Select, Tooltip } from 'a
import numeral from 'numeral';
import type { FC } from 'react';
import React from 'react';
import { categoryOptions } from '../../mock';
import StandardFormRow from './components/StandardFormRow';
import TagSelect from './components/TagSelect';
import type { ListItemDataType } from './data.d';
import { queryFakeList } from './service';
import useStyles from './style.style';
import { categoryOptions } from '../../mock';
export function formatWan(val: number) {
const v = val * 1;
if (!v || Number.isNaN(v)) return '';
@ -96,7 +96,9 @@ export const Applications: FC<Record<string, any>> = () => {
<Form.Item name="category">
<TagSelect expandable>
{categoryOptions.map((category) => (
<TagSelect.Option value={category.value!} key={category.value}>{category.label}</TagSelect.Option>
<TagSelect.Option value={category.value!} key={category.value}>
{category.label}
</TagSelect.Option>
))}
</TagSelect>
</Form.Item>
@ -115,7 +117,7 @@ export const Applications: FC<Record<string, any>> = () => {
{
label: '王昭君',
value: 'lisa',
}
},
]}
/>
</Form.Item>

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

@ -1,16 +1,16 @@
import { LikeOutlined, LoadingOutlined, MessageOutlined, StarOutlined } from '@ant-design/icons';
import { useRequest } from '@umijs/max';
import { Button, Card, Col, Form, List, Row, Select, Tag } from 'antd';
import { DefaultOptionType } from 'antd/es/select';
import type { FC } from 'react';
import React, { useMemo } from 'react';
import { categoryOptions } from '../../mock';
import ArticleListContent from './components/ArticleListContent';
import StandardFormRow from './components/StandardFormRow';
import TagSelect from './components/TagSelect';
import type { ListItemDataType } from './data.d';
import { queryFakeList } from './service';
import useStyles from './style.style';
import { categoryOptions } from '../../mock';
import { DefaultOptionType } from 'antd/es/select';
const FormItem = Form.Item;
@ -116,10 +116,14 @@ const Articles: FC = () => {
</div>
);
const ownerOptions = useMemo<DefaultOptionType[]>(() => owners.map(item => ({
const ownerOptions = useMemo<DefaultOptionType[]>(
() =>
owners.map((item) => ({
label: item.name,
value: item.id,
})), [owners]);
})),
[owners],
);
return (
<>
@ -136,7 +140,9 @@ const Articles: FC = () => {
<FormItem name="category">
<TagSelect expandable>
{categoryOptions.map((category) => (
<TagSelect.Option value={category.value!} key={category.value}>{category.label}</TagSelect.Option>
<TagSelect.Option value={category.value!} key={category.value}>
{category.label}
</TagSelect.Option>
))}
</TagSelect>
</FormItem>
@ -165,7 +171,7 @@ const Articles: FC = () => {
{
label: '李三',
value: 'lisa',
}
},
]}
/>
</FormItem>
@ -179,7 +185,7 @@ const Articles: FC = () => {
{
label: '优秀',
value: 'good',
}
},
]}
/>
</FormItem>

3
src/pages/list/search/index.tsx

@ -26,7 +26,8 @@ const Search: FC<SearchProps> = () => {
const location = useLocation();
let match = useMatch(location.pathname);
const handleTabChange = (key: string) => {
const url = match?.pathname === '/' ? '' : match?.pathname.substring(0, match.pathname.lastIndexOf('/'));
const url =
match?.pathname === '/' ? '' : match?.pathname.substring(0, match.pathname.lastIndexOf('/'));
switch (key) {
case 'articles':
history.push(`${url}/articles`);

10
src/pages/list/search/projects/index.tsx

@ -3,13 +3,13 @@ import { Card, Col, Form, List, Row, Select, Typography } from 'antd';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import type { FC } from 'react';
import { categoryOptions } from '../../mock';
import AvatarList from './components/AvatarList';
import StandardFormRow from './components/StandardFormRow';
import TagSelect from './components/TagSelect';
import type { ListItemDataType } from './data.d';
import { queryFakeList } from './service';
import useStyles from './style.style';
import { categoryOptions } from '../../mock';
dayjs.extend(relativeTime);
@ -104,7 +104,9 @@ const Projects: FC = () => {
<FormItem name="category">
<TagSelect expandable>
{categoryOptions.map((category) => (
<TagSelect.Option value={category.value!} key={category.value}>{category.label}</TagSelect.Option>
<TagSelect.Option value={category.value!} key={category.value}>
{category.label}
</TagSelect.Option>
))}
</TagSelect>
</FormItem>
@ -123,7 +125,7 @@ const Projects: FC = () => {
{
label: '王昭君',
value: 'lisa',
}
},
]}
/>
</FormItem>
@ -144,7 +146,7 @@ const Projects: FC = () => {
{
label: '普通',
value: 'normal',
}
},
]}
/>
</FormItem>

2
src/pages/user/login/index.tsx

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

Loading…
Cancel
Save