Skip to content

Commit 818926f

Browse files
committed
✨ feat: add react-dev-inspector plugins
1 parent f0344c4 commit 818926f

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

Diff for: config/config.ts

+8
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,12 @@ export default defineConfig({
4141
basePath: '/',
4242
},
4343
esbuild: {},
44+
// https://github.com/zthxxx/react-dev-inspector
45+
plugins: ['react-dev-inspector/plugins/umi/react-inspector'],
46+
inspectorConfig: {
47+
// loader options type and docs see below
48+
exclude: [],
49+
babelPlugins: [],
50+
babelOptions: {},
51+
},
4452
});

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ant-design-pro",
3-
"version": "4.4.0",
3+
"version": "4.5.0",
44
"private": true,
55
"description": "An out-of-box UI solution for enterprise applications",
66
"scripts": {
@@ -66,6 +66,7 @@
6666
"omit.js": "^2.0.2",
6767
"qs": "^6.9.0",
6868
"react": "^17.0.0",
69+
"react-dev-inspector": "^1.1.1",
6970
"react-dom": "^17.0.0",
7071
"react-helmet-async": "^1.0.4",
7172
"umi": "^3.2.14",

Diff for: src/pages/ListTableList/index.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React, { useState, useRef } from 'react';
44
import { useIntl, FormattedMessage } from 'umi';
55
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
66
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
7-
import ProDescriptions from '@ant-design/pro-descriptions';
7+
import ProDescriptions, { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
88
import CreateForm from './components/CreateForm';
99
import UpdateForm, { FormValueType } from './components/UpdateForm';
1010
import { TableListItem } from './data.d';
@@ -214,7 +214,7 @@ const TableList: React.FC<{}> = () => {
214214
labelWidth: 120,
215215
}}
216216
toolBarRender={() => [
217-
<Button type="primary" onClick={() => handleModalVisible(true)}>
217+
<Button type="primary" key="primary" onClick={() => handleModalVisible(true)}>
218218
<PlusOutlined /> <FormattedMessage id="pages.searchTable.new" defaultMessage="新建" />
219219
</Button>,
220220
]}
@@ -312,7 +312,7 @@ const TableList: React.FC<{}> = () => {
312312
params={{
313313
id: row?.name,
314314
}}
315-
columns={columns}
315+
columns={columns as ProDescriptionsItemProps<TableListItem>[]}
316316
/>
317317
)}
318318
</Drawer>

0 commit comments

Comments
 (0)