shaogen1995 1 rok temu
rodzic
commit
753f67dac7

+ 2 - 2
src/components/ZupOne/index.tsx

@@ -21,7 +21,6 @@ import MyPopconfirm from "../MyPopconfirm";
 // 这个组件 只处理 上传 一张图片或者 视频 音频 模型 的情况
 
 type Props = {
-  isLook: boolean; //是不是查看
   fileCheck: boolean; //有没有点击过确定
   size: number; //上传附件大小(M)
   dirCode: string; //文件的code码
@@ -31,13 +30,13 @@ type Props = {
   checkTxt: string;
   upTxt: string;
   myType: "thumb" | "video" | "audio" | "model";
+  isLook?: boolean; //是不是查看
   fromData?: any;
   ref: any; //当前自己的ref,给父组件调用
 };
 
 function ZupOne(
   {
-    isLook,
     fileCheck,
     size,
     dirCode,
@@ -47,6 +46,7 @@ function ZupOne(
     checkTxt,
     upTxt,
     myType,
+    isLook=false,
     fromData,
   }: Props,
   ref: any

+ 5 - 5
src/components/ZupTypes/index.tsx

@@ -34,11 +34,11 @@ export type FileListType = {
 
 type Props = {
   ref: any; //当前自己的ref,给父组件调用
-  selecFlag: string; //筛选的数组
-  isLook: boolean; //是不是查看
+  selecFlag: string; //筛选的字符串 模型/图片/音频/视频
   fileCheck: boolean; //有没有点击过确定
   dirCode: string; //文件的code码
   myUrl: string; //请求地址
+  isLook?: boolean; //是不是查看
   modelSize?: number; //模型文件大小限制
   imgSize?: number; //图片大小限制
   imgLength?: number; //图片数量限制
@@ -49,10 +49,10 @@ type Props = {
 function ZupTypes(
   {
     selecFlag,
-    isLook,
     fileCheck,
     dirCode,
     myUrl,
+    isLook = false,
     modelSize = 500,
     imgSize = 5,
     imgLength = 9,
@@ -231,7 +231,7 @@ function ZupTypes(
       const dom = (
         <div className="ZTbox" hidden={!typeCheck.includes(type)}>
           <div className="ZTbox1">
-            <span> </span>{" "}
+            <span> </span>
             {type === "model" ? "模型" : type === "audio" ? "音频" : "视频"}:
           </div>
           {fileList[type].id ? (
@@ -452,7 +452,7 @@ function ZupTypes(
               <br />
             </>
           ) : null}
-          支持png、jpg、gif和jpeg的图片格式;最大支持5M;最多支持9张。
+          支持png、jpg、gif和jpeg的图片格式;最大支持5M;最多支持{imgLength}张。
         </div>
       </div>