{
this.root = n;
}}
@@ -204,7 +203,6 @@ class WaterWave extends Component {
}}
>
= (props) => {
const { styles } = useStyles();
- const { links, linkElement, onAdd } = props;
+ const { links = [], linkElement = 'a', onAdd = () => {} } = props;
return (
{links.map((link) =>
@@ -34,9 +34,5 @@ const EditableLinkGroup: React.FC = (props) => {
);
};
-EditableLinkGroup.defaultProps = {
- links: [],
- onAdd: () => {},
- linkElement: 'a',
-};
+
export default EditableLinkGroup;
diff --git a/src/pages/dashboard/workplace/data.d.ts b/src/pages/dashboard/workplace/data.d.ts
index b1114d1e..e9ccf288 100644
--- a/src/pages/dashboard/workplace/data.d.ts
+++ b/src/pages/dashboard/workplace/data.d.ts
@@ -1,7 +1,6 @@
-import { DataItem } from '@antv/g2plot/esm/interface/config';
-
-export { DataItem };
-
+export interface DataItem {
+ [field: string]: string | number | number[] | null | undefined;
+}
export interface TagType {
key: string;
label: string;
diff --git a/src/pages/form/advanced-form/index.tsx b/src/pages/form/advanced-form/index.tsx
index bc9540c2..4beea994 100644
--- a/src/pages/form/advanced-form/index.tsx
+++ b/src/pages/form/advanced-form/index.tsx
@@ -95,7 +95,7 @@ const AdvancedForm: FC
> = () => {
onClick={() => scrollToField(key)}
>
- {err.errors[0]}
+ {err.errors[0]}
{fieldLabels[key]}
);
diff --git a/src/pages/form/step-form/index.tsx b/src/pages/form/step-form/index.tsx
index 0432c660..4ec294a8 100644
--- a/src/pages/form/step-form/index.tsx
+++ b/src/pages/form/step-form/index.tsx
@@ -82,7 +82,7 @@ const StepForm: React.FC> = () => {
receiverMode: 'alipay',
});
const [current, setCurrent] = useState(0);
- const formRef = useRef();
+ const formRef = useRef(null);
return (
diff --git a/src/pages/list/table-list/index.tsx b/src/pages/list/table-list/index.tsx
index 23ce02c2..bff569b9 100644
--- a/src/pages/list/table-list/index.tsx
+++ b/src/pages/list/table-list/index.tsx
@@ -98,7 +98,7 @@ const TableList: React.FC = () => {
const [updateModalVisible, handleUpdateModalVisible] =
useState(false);
const [showDetail, setShowDetail] = useState(false);
- const actionRef = useRef();
+ const actionRef = useRef(null);
const [currentRow, setCurrentRow] = useState();
const [selectedRowsState, setSelectedRows] = useState([]);
/** 国际化配置 */
diff --git a/src/pages/table-list/components/UpdateForm.tsx b/src/pages/table-list/components/UpdateForm.tsx
index bbe0a948..a3195418 100644
--- a/src/pages/table-list/components/UpdateForm.tsx
+++ b/src/pages/table-list/components/UpdateForm.tsx
@@ -20,7 +20,7 @@ export type FormValueType = {
} & Partial;
export type UpdateFormProps = {
- trigger?: JSX.Element;
+ trigger?: React.ReactElement;
onOk?: () => void;
values: Partial;
};
diff --git a/src/pages/user/login/login.test.tsx b/src/pages/user/login/login.test.tsx
index 36eb6210..c34b6fb3 100644
--- a/src/pages/user/login/login.test.tsx
+++ b/src/pages/user/login/login.test.tsx
@@ -1,4 +1,5 @@
-import { startMock } from '@@/requestRecordMock';
+// @ts-ignore
+import { startMock } from '@@/requestRecordMock';
import { TestBrowser } from '@@/testBrowser';
import { fireEvent, render } from '@testing-library/react';
import React, { act } from 'react';
diff --git a/src/pages/user/register/index.tsx b/src/pages/user/register/index.tsx
index b24d3023..33aab441 100644
--- a/src/pages/user/register/index.tsx
+++ b/src/pages/user/register/index.tsx
@@ -16,7 +16,7 @@ import type { FC } from 'react';
import { useEffect, useState } from 'react';
import type { StateType } from './service';
import { fakeRegister } from './service';
-import useStyles from './style.style';
+import useStyles from './styles';
const FormItem = Form.Item;
const { Option } = Select;
@@ -135,7 +135,9 @@ const Register: FC = () => {
const value = form.getFieldValue('password');
const passwordStatus = getPasswordStatus();
return value?.length ? (
-
+