wjx 2 gün önce
ebeveyn
işleme
aa445fdc6c

+ 2 - 2
src/pages/launchSystemV3/tencenTasset/manageComponent/addComponents.tsx

@@ -196,10 +196,10 @@ const AddComponents: React.FC<Props> = ({ type, putInType, accountId, visible, o
                                                 num: count,
                                                 defaultParams: {
                                                     materialType: type === 'IMAGE' ? 'image' : 'video',
-                                                    sizeQueries: [
+                                                    sizeQueries: Array.isArray(componentData?.restriction) ? componentData?.restriction?.map(item => ({ relation: '=', width: item.width || 0, height: item.height || 0 })) : [
                                                         { relation: '=', width: componentData?.restriction.width || 0, height: componentData?.restriction.height || 0 }
                                                     ],
-                                                    fileSize: (componentData?.restriction.fileSize || 0) * 1024
+                                                    fileSize: Array.isArray(componentData?.restriction) ?  (componentData?.restriction?.[0].fileSize || 0) * 1024 : (componentData?.restriction.fileSize || 0) * 1024
                                                 }
                                             })
                                             setMaterialConfig({

+ 18 - 8
src/pages/launchSystemV3/tencenTasset/manageComponent/const.ts

@@ -78,14 +78,24 @@ export const DEFAULT_COMPONENT_SUB_IMAGE_TYPE = [
     {
         label: '9:16单图',
         value: 'IMAGE_9X16',
-        restriction: {
-            width: 1080,
-            height: 1920,
-            fileSize: 400,
-            maxNumber: 1,
-            minNumber: 1,
-            name: 'image'
-        }
+        restriction: [
+            {
+                width: 1080,
+                height: 1920,
+                fileSize: 400,
+                maxNumber: 1,
+                minNumber: 1,
+                name: 'image'
+            },
+            {
+                width: 720,
+                height: 1280,
+                fileSize: 400,
+                maxNumber: 1,
+                minNumber: 1,
+                name: 'image'
+            }
+        ]
     },
     {
         label: '1:1单图',