diff --git a/config/config.ts b/config/config.ts index 94c52cb0..a0675002 100644 --- a/config/config.ts +++ b/config/config.ts @@ -41,4 +41,12 @@ export default defineConfig({ basePath: '/', }, esbuild: {}, + // https://github.com/zthxxx/react-dev-inspector + plugins: ['react-dev-inspector/plugins/umi/react-inspector'], + inspectorConfig: { + // loader options type and docs see below + exclude: [], + babelPlugins: [], + babelOptions: {}, + }, }); diff --git a/package.json b/package.json index f5f9fdf5..df9b3c56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-pro", - "version": "4.4.0", + "version": "4.5.0", "private": true, "description": "An out-of-box UI solution for enterprise applications", "scripts": { @@ -66,6 +66,7 @@ "omit.js": "^2.0.2", "qs": "^6.9.0", "react": "^17.0.0", + "react-dev-inspector": "^1.1.1", "react-dom": "^17.0.0", "react-helmet-async": "^1.0.4", "umi": "^3.2.14", diff --git a/src/pages/ListTableList/index.tsx b/src/pages/ListTableList/index.tsx index 1105a354..0cd49fd3 100644 --- a/src/pages/ListTableList/index.tsx +++ b/src/pages/ListTableList/index.tsx @@ -4,7 +4,7 @@ import React, { useState, useRef } from 'react'; import { useIntl, FormattedMessage } from 'umi'; import { PageContainer, FooterToolbar } from '@ant-design/pro-layout'; import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table'; -import ProDescriptions from '@ant-design/pro-descriptions'; +import ProDescriptions, { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import CreateForm from './components/CreateForm'; import UpdateForm, { FormValueType } from './components/UpdateForm'; import { TableListItem } from './data.d'; @@ -214,7 +214,7 @@ const TableList: React.FC<{}> = () => { labelWidth: 120, }} toolBarRender={() => [ - , ]} @@ -312,7 +312,7 @@ const TableList: React.FC<{}> = () => { params={{ id: row?.name, }} - columns={columns} + columns={columns as ProDescriptionsItemProps[]} /> )}