Explorar el Código

fix(product): fix product baseInfo

Lind hace 4 años
padre
commit
5620012666
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/pages/device/Product/Detail/BaseInfo/index.tsx

+ 2 - 2
src/pages/device/Product/Detail/BaseInfo/index.tsx

@@ -63,7 +63,7 @@ const BaseInfo = () => {
   };
 
   const renderConfigCard = () => {
-    return metadata ? (
+    return metadata && metadata.length > 0 ? (
       metadata?.map((item) => {
         const itemSchema: ISchema = {
           type: 'object',
@@ -115,7 +115,7 @@ const BaseInfo = () => {
         );
       })
     ) : (
-      <Empty />
+      <Empty description={'暂无配置'} />
     );
   };