四维时代-内部项目资料管理系统

shaogen1995 9cdb0dd2d3 upp 1 год назад
public f0358d631a 'init' 2 лет назад
src 9cdb0dd2d3 upp 1 год назад
.gitignore f0358d631a 'init' 2 лет назад
README.md 0639aa7a2b md文档的更新 2 лет назад
config-overrides.js f0358d631a 'init' 2 лет назад
package-lock.json 0b9e50b8f8 upp 2 лет назад
package.json 0b9e50b8f8 upp 2 лет назад
path.tsconfig.json f0358d631a 'init' 2 лет назад
tsconfig.json f0358d631a 'init' 2 лет назад

README.md

改动了部分源码。

接手项目请修改源码。

1.版本类型问题

找到 import { useDispatch } from "react-redux";

按住 Ctrl 点击 useDispatch 出来 useDispatch.d.ts类型声明文件 (路径node_modules>react-redux>es>hooks>useDispatch.d.ts)

找到最后面的 AnyAction,按住 Ctrl 点击 进入 (路径node_modules>redux>index.d.ts)

找到 export interface Action { type: T }

在type后面加一个 ? 即=>

export interface Action { type?: T }

2.添加了antd的 UploadFile 类型 声明

找到 const [fileList, setFileList] = useState([]);

按住 Ctrl 点击 UploadFile 进入 (路径node_modules>antd>es>upload>interface.d.ts)

在第 12 行 添加一个自定义类型声明:

type SelectType = {

id: number;
value: number | undefined;
txt: string;
tit: string;
fileName: string;
resName:string

};

export interface UploadFile extends ProgressAriaProps {

.....(上面自带的不用管,把 SelectType 加到最下面即可)
mySelect:SelectType

}

如果还不能解决请联系:邵根-18702025090