diff --git a/src/pages/dashboard/monitor/components/Charts/WaterWave/index.tsx b/src/pages/dashboard/monitor/components/Charts/WaterWave/index.tsx
index ed4bae7d..901be207 100644
--- a/src/pages/dashboard/monitor/components/Charts/WaterWave/index.tsx
+++ b/src/pages/dashboard/monitor/components/Charts/WaterWave/index.tsx
@@ -87,7 +87,11 @@ class WaterWave extends Component
{
const bR = radius - lineWidth;
const circleOffset = -(Math.PI / 2);
let circleLock = true;
- for (let i = circleOffset; i < circleOffset + 2 * Math.PI; i += 1 / (8 * Math.PI)) {
+ for (
+ let i = circleOffset;
+ i < circleOffset + 2 * Math.PI;
+ i += 1 / (8 * Math.PI)
+ ) {
arcStack.push([radius + bR * Math.cos(i), radius + bR * Math.sin(i)]);
}
const cStartPoint = arcStack.shift() as number[];
diff --git a/src/pages/dashboard/monitor/components/Charts/autoHeight.tsx b/src/pages/dashboard/monitor/components/Charts/autoHeight.tsx
index e827959a..c5af01b7 100644
--- a/src/pages/dashboard/monitor/components/Charts/autoHeight.tsx
+++ b/src/pages/dashboard/monitor/components/Charts/autoHeight.tsx
@@ -1,6 +1,8 @@
import React from 'react';
-export type IReactComponent = React.ComponentClass
| React.ClassicComponentClass
;
+export type IReactComponent
=
+ | React.ComponentClass
+ | React.ClassicComponentClass
;
function computeHeight(node: HTMLDivElement) {
const { style } = node;
diff --git a/src/pages/dashboard/monitor/components/Map/index.tsx b/src/pages/dashboard/monitor/components/Map/index.tsx
index b434a9f0..df155e1f 100644
--- a/src/pages/dashboard/monitor/components/Map/index.tsx
+++ b/src/pages/dashboard/monitor/components/Map/index.tsx
@@ -2,7 +2,15 @@ import { PageLoading } from '@ant-design/pro-components';
import { HeatmapLayer, MapboxScene, PointLayer } from '@antv/l7-react';
import * as React from 'react';
-const colors = ['#eff3ff', '#c6dbef', '#9ecae1', '#6baed6', '#4292c6', '#2171b5', '#084594'];
+const colors = [
+ '#eff3ff',
+ '#c6dbef',
+ '#9ecae1',
+ '#6baed6',
+ '#4292c6',
+ '#2171b5',
+ '#084594',
+];
export default class MonitorMap extends React.Component {
state = {
data: null,
diff --git a/src/pages/dashboard/monitor/index.tsx b/src/pages/dashboard/monitor/index.tsx
index 61847969..06a9fe9a 100644
--- a/src/pages/dashboard/monitor/index.tsx
+++ b/src/pages/dashboard/monitor/index.tsx
@@ -24,160 +24,173 @@ const Monitor: FC = () => {
});
return (
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- '优',
- }}
- meta={{
- color: {
- range: ['#6395FA', '#62DAAB', '#657798', '#F7C128', '#1F8718'],
- },
- }}
- />
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- '优',
+ }}
+ meta={{
+ color: {
+ range: [
+ '#6395FA',
+ '#62DAAB',
+ '#657798',
+ '#F7C128',
+ '#1F8718',
+ ],
+ },
+ }}
+ />
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
);
};
diff --git a/src/pages/dashboard/workplace/_mock.ts b/src/pages/dashboard/workplace/_mock.ts
index 75b8fcf5..c0dc9b73 100644
--- a/src/pages/dashboard/workplace/_mock.ts
+++ b/src/pages/dashboard/workplace/_mock.ts
@@ -127,7 +127,7 @@ for (let i = 0; i < 10; i += 1) {
const offlineChartData: DataItem[] = [];
for (let i = 0; i < 20; i += 1) {
offlineChartData.push({
- x: Date.now()+ 1000 * 60 * 30 * i,
+ x: Date.now() + 1000 * 60 * 30 * i,
y1: Math.floor(Math.random() * 100) + 10,
y2: Math.floor(Math.random() * 100) + 10,
});
diff --git a/src/pages/dashboard/workplace/index.tsx b/src/pages/dashboard/workplace/index.tsx
index e47fa8a8..15f107b9 100644
--- a/src/pages/dashboard/workplace/index.tsx
+++ b/src/pages/dashboard/workplace/index.tsx
@@ -9,6 +9,7 @@ import EditableLinkGroup from './components/EditableLinkGroup';
import type { ActivitiesType, CurrentUser } from './data.d';
import { fakeChartData, queryActivities, queryProjectNotice } from './service';
import useStyles from './style.style';
+
dayjs.extend(relativeTime);
const links = [
@@ -89,8 +90,10 @@ const ExtraContent: FC> = () => {
};
const Workplace: FC = () => {
const { styles } = useStyles();
- const { loading: projectLoading, data: projectNotice = [] } = useRequest(queryProjectNotice);
- const { loading: activitiesLoading, data: activities = [] } = useRequest(queryActivities);
+ const { loading: projectLoading, data: projectNotice = [] } =
+ useRequest(queryProjectNotice);
+ const { loading: activitiesLoading, data: activities = [] } =
+ useRequest(queryActivities);
const { data } = useRequest(fakeChartData);
const renderActivities = (item: ActivitiesType) => {
const events = item.template.split(/@\{([^{}]*)\}/gi).map((key) => {
@@ -130,7 +133,8 @@ const Workplace: FC = () => {
content={
{
padding: 0,
}}
>
- {}} links={links} linkElement={Link} />
+ {}}
+ links={links}
+ linkElement={Link}
+ />
{
- {item.member.substring(0, 3)}
+
+ {item.member.substring(0, 3)}
+
);
diff --git a/src/pages/dashboard/workplace/style.style.ts b/src/pages/dashboard/workplace/style.style.ts
index fdd467c0..8bd03d35 100644
--- a/src/pages/dashboard/workplace/style.style.ts
+++ b/src/pages/dashboard/workplace/style.style.ts
@@ -55,9 +55,10 @@ const useStyles = createStyles(({ token }) => {
},
float: 'right',
whiteSpace: 'nowrap',
- [`@media screen and (max-width: ${token.screenXL}px) and (min-width: @screen-lg)`]: {
- marginLeft: '-44px',
- },
+ [`@media screen and (max-width: ${token.screenXL}px) and (min-width: @screen-lg)`]:
+ {
+ marginLeft: '-44px',
+ },
[`@media screen and (max-width: ${token.screenLG}px)`]: {
float: 'none',
marginRight: '0',
@@ -101,9 +102,10 @@ const useStyles = createStyles(({ token }) => {
display: 'none',
},
},
- [`@media screen and (max-width: ${token.screenXL}px) and (min-width: @screen-lg)`]: {
- padding: '0 16px',
- },
+ [`@media screen and (max-width: ${token.screenXL}px) and (min-width: @screen-lg)`]:
+ {
+ padding: '0 16px',
+ },
[`@media screen and (max-width: ${token.screenLG}px)`]: {
padding: '0 16px',
textAlign: 'left',
@@ -128,9 +130,10 @@ const useStyles = createStyles(({ token }) => {
color: token.colorPrimary,
},
},
- [`@media screen and (max-width: ${token.screenXL}px) and (min-width: @screen-lg)`]: {
- marginBottom: '0',
- },
+ [`@media screen and (max-width: ${token.screenXL}px) and (min-width: @screen-lg)`]:
+ {
+ marginBottom: '0',
+ },
[`@media screen and (max-width: ${token.screenLG}px)`]: {
marginBottom: '0',
},
@@ -199,9 +202,10 @@ const useStyles = createStyles(({ token }) => {
color: token.colorTextDisabled,
},
activeCard: {
- [`@media screen and (max-width: ${token.screenXL}px) and (min-width: @screen-lg)`]: {
- marginBottom: '24px',
- },
+ [`@media screen and (max-width: ${token.screenXL}px) and (min-width: @screen-lg)`]:
+ {
+ marginBottom: '24px',
+ },
[`@media screen and (max-width: ${token.screenLG}px)`]: {
marginBottom: '24px',
},
diff --git a/src/pages/form/advanced-form/components/TableForm.tsx b/src/pages/form/advanced-form/components/TableForm.tsx
index b98256c1..e42f0fe9 100644
--- a/src/pages/form/advanced-form/components/TableForm.tsx
+++ b/src/pages/form/advanced-form/components/TableForm.tsx
@@ -3,6 +3,7 @@ import { Button, Divider, Input, message, Popconfirm, Table } from 'antd';
import type { FC } from 'react';
import React, { useState } from 'react';
import useStyles from '../style.style';
+
type TableFormDateType = {
key: string;
workId?: string;
@@ -20,11 +21,16 @@ const TableForm: FC = ({ value, onChange }) => {
const [clickedCancel, setClickedCancel] = useState(false);
const [loading, setLoading] = useState(false);
const [index, setIndex] = useState(0);
- const [cacheOriginData, setCacheOriginData] = useState>({});
+ const [cacheOriginData, setCacheOriginData] = useState>(
+ {},
+ );
const [data, setData] = useState(value);
const getRowByKey = (key: string, newData?: TableFormDateType[]) =>
(newData || data)?.filter((item) => item.key === key)[0];
- const toggleEditable = (e: React.MouseEvent | React.KeyboardEvent, key: string) => {
+ const toggleEditable = (
+ e: React.MouseEvent | React.KeyboardEvent,
+ key: string,
+ ) => {
e.preventDefault();
const newData = data?.map((item) => ({
...item,
@@ -59,7 +65,9 @@ const TableForm: FC = ({ value, onChange }) => {
setData(newData);
};
const remove = (key: string) => {
- const newData = data?.filter((item) => item.key !== key) as TableFormDateType[];
+ const newData = data?.filter(
+ (item) => item.key !== key,
+ ) as TableFormDateType[];
setData(newData);
if (onChange) {
onChange(newData);
@@ -201,7 +209,10 @@ const TableForm: FC = ({ value, onChange }) => {
saveRow(e, record.key)}>添加
- remove(record.key)}>
+ remove(record.key)}
+ >
删除
@@ -219,7 +230,10 @@ const TableForm: FC = ({ value, onChange }) => {
toggleEditable(e, record.key)}>编辑
- remove(record.key)}>
+ remove(record.key)}
+ >
删除
diff --git a/src/pages/form/advanced-form/index.tsx b/src/pages/form/advanced-form/index.tsx
index a1d05fd7..bc9540c2 100644
--- a/src/pages/form/advanced-form/index.tsx
+++ b/src/pages/form/advanced-form/index.tsx
@@ -15,6 +15,7 @@ import type { FC } from 'react';
import { useState } from 'react';
import { fakeSubmitForm } from './service';
import useStyles from './style.style';
+
interface TableFormDateType {
key: string;
workId?: string;
@@ -80,9 +81,19 @@ const AdvancedForm: FC> = () => {
if (!err || err.errors.length === 0) {
return null;
}
- const key = err.name[0] as 'name' | 'url' | 'owner' | 'approver' | 'dateRange' | 'type';
+ const key = err.name[0] as
+ | 'name'
+ | 'url'
+ | 'owner'
+ | 'approver'
+ | 'dateRange'
+ | 'type';
return (
- scrollToField(key)}>
+ scrollToField(key)}
+ >
{err.errors[0]}
{fieldLabels[key]}
diff --git a/src/pages/form/basic-form/index.tsx b/src/pages/form/basic-form/index.tsx
index 323606d3..882fb0b3 100644
--- a/src/pages/form/basic-form/index.tsx
+++ b/src/pages/form/basic-form/index.tsx
@@ -14,6 +14,7 @@ import { Card, message } from 'antd';
import type { FC } from 'react';
import { fakeSubmitForm } from './service';
import useStyles from './style.style';
+
const BasicForm: FC> = () => {
const { styles } = useStyles();
const { run } = useRequest(fakeSubmitForm, {
@@ -163,7 +164,8 @@ const BasicForm: FC> = () => {
fieldProps={{
style: {
margin: '8px 0',
- display: publicType && publicType === '2' ? 'block' : 'none',
+ display:
+ publicType && publicType === '2' ? 'block' : 'none',
},
}}
options={[
diff --git a/src/pages/form/step-form/index.tsx b/src/pages/form/step-form/index.tsx
index d1e5969f..0432c660 100644
--- a/src/pages/form/step-form/index.tsx
+++ b/src/pages/form/step-form/index.tsx
@@ -7,10 +7,19 @@ import {
StepsForm,
} from '@ant-design/pro-components';
import type { FormInstance } from 'antd';
-import { Alert, Button, Card, Descriptions, Divider, Result, Statistic } from 'antd';
+import {
+ Alert,
+ Button,
+ Card,
+ Descriptions,
+ Divider,
+ Result,
+ Statistic,
+} from 'antd';
import React, { useRef, useState } from 'react';
import type { StepDataType } from './data.d';
import useStyles from './style.style';
+
const StepDescriptions: React.FC<{
stepData: StepDataType;
bordered?: boolean;
diff --git a/src/pages/list/basic-list/_mock.ts b/src/pages/list/basic-list/_mock.ts
index 88ee6eb7..680f6883 100644
--- a/src/pages/list/basic-list/_mock.ts
+++ b/src/pages/list/basic-list/_mock.ts
@@ -57,7 +57,10 @@ function fakeList(count: number): BasicListItemDataType[] {
owner: user[i % 10],
title: titles[i % 8],
avatar: avatars[i % 8],
- cover: parseInt(`${i / 4}`, 10) % 2 === 0 ? covers[i % 4] : covers[3 - (i % 4)],
+ cover:
+ parseInt(`${i / 4}`, 10) % 2 === 0
+ ? covers[i % 4]
+ : covers[3 - (i % 4)],
status: ['active', 'exception', 'normal'][i % 3] as
| 'normal'
| 'exception'
@@ -66,8 +69,8 @@ function fakeList(count: number): BasicListItemDataType[] {
percent: Math.ceil(Math.random() * 50) + 50,
logo: avatars[i % 8],
href: 'https://ant.design',
- updatedAt: new Date(Date.now()- 1000 * 60 * 60 * 2 * i).getTime(),
- createdAt: new Date(Date.now()- 1000 * 60 * 60 * 2 * i).getTime(),
+ updatedAt: new Date(Date.now() - 1000 * 60 * 60 * 2 * i).getTime(),
+ createdAt: new Date(Date.now() - 1000 * 60 * 60 * 2 * i).getTime(),
subDescription: desc[i % 5],
description:
'在中台产品的研发过程中,会出现不同的设计规范和实现方式,但其中往往存在很多类似的页面和组件,这些类似的组件会被抽离成一套标准规范。',
@@ -80,17 +83,20 @@ function fakeList(count: number): BasicListItemDataType[] {
'段落示意:蚂蚁金服设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。蚂蚁金服设计平台 ant.design,用最小的工作量,无缝接入蚂蚁金服生态,提供跨越设计与开发的体验解决方案。',
members: [
{
- avatar: 'https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png',
+ avatar:
+ 'https://gw.alipayobjects.com/zos/rmsportal/ZiESqWwCXBRQoaPONSJe.png',
name: '曲丽丽',
id: 'member1',
},
{
- avatar: 'https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png',
+ avatar:
+ 'https://gw.alipayobjects.com/zos/rmsportal/tBOxZPlITHqwlGjsJWaF.png',
name: '王昭君',
id: 'member2',
},
{
- avatar: 'https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png',
+ avatar:
+ 'https://gw.alipayobjects.com/zos/rmsportal/sBxjgqiuHMGRkIjqlQCd.png',
name: '董娜娜',
id: 'member3',
},
diff --git a/src/pages/list/basic-list/components/OperationModal.tsx b/src/pages/list/basic-list/components/OperationModal.tsx
index bc0921cf..4f3fb9e9 100644
--- a/src/pages/list/basic-list/components/OperationModal.tsx
+++ b/src/pages/list/basic-list/components/OperationModal.tsx
@@ -9,6 +9,7 @@ import { Button, Result } from 'antd';
import type { FC } from 'react';
import type { BasicListItemDataType } from '../data.d';
import useStyles from '../style.style';
+
type OperationModalProps = {
done: boolean;
open: boolean;
diff --git a/src/pages/list/basic-list/index.tsx b/src/pages/list/basic-list/index.tsx
index b90e8d39..1a3cbee0 100644
--- a/src/pages/list/basic-list/index.tsx
+++ b/src/pages/list/basic-list/index.tsx
@@ -19,8 +19,14 @@ import type { FC } from 'react';
import React, { useState } from 'react';
import OperationModal from './components/OperationModal';
import type { BasicListItemDataType } from './data.d';
-import { addFakeList, queryFakeList, removeFakeList, updateFakeList } from './service';
+import {
+ addFakeList,
+ queryFakeList,
+ removeFakeList,
+ updateFakeList,
+} from './service';
import useStyles from './style.style';
+
const RadioButton = Radio.Button;
const RadioGroup = Radio.Group;
const { Search } = Input;
@@ -71,7 +77,9 @@ export const BasicList: FC = () => {
const { styles } = useStyles();
const [done, setDone] = useState(false);
const [open, setVisible] = useState(false);
- const [current, setCurrent] = useState | undefined>(undefined);
+ const [current, setCurrent] = useState<
+ Partial | undefined
+ >(undefined);
const {
data: listData,
loading,
@@ -114,7 +122,10 @@ export const BasicList: FC = () => {
id,
});
};
- const editAndDelete = (key: string | number, currentItem: BasicListItemDataType) => {
+ const editAndDelete = (
+ key: string | number,
+ currentItem: BasicListItemDataType,
+ ) => {
if (key === 'edit') showEditModal(currentItem);
else if (key === 'delete') {
Modal.confirm({
@@ -133,7 +144,11 @@ export const BasicList: FC = () => {
进行中
等待中
- ({})} />
+ ({})}
+ />