shaogen1995 1 anno fa
parent
commit
0639aa7a2b
1 ha cambiato i file con 52 aggiunte e 1 eliminazioni
  1. 52 1
      README.md

+ 52 - 1
README.md

@@ -1,2 +1,53 @@
 改动了部分源码。
-接手项目请联系:邵根-18702025090
+
+接手项目请修改源码。
+
+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<T = any> {
+  type: T
+}
+
+在type后面加一个 ?   即=>
+
+export interface Action<T = any> {
+  type?: T
+}
+
+
+
+
+2.添加了antd的 UploadFile 类型 声明
+
+找到   const [fileList, setFileList] = useState<UploadFile[]>([]);
+
+按住 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<T = any> extends ProgressAriaProps {
+    .....(上面自带的不用管,把 SelectType 加到最下面即可)
+    mySelect:SelectType
+}
+
+如果还不能解决请联系:邵根-18702025090