Browse Source

fix(product): fix product baseInfo

Lind 4 years atrás
parent
commit
5620012666
1 changed files with 2 additions and 2 deletions
  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 = () => {
   const renderConfigCard = () => {
-    return metadata ? (
+    return metadata && metadata.length > 0 ? (
       metadata?.map((item) => {
       metadata?.map((item) => {
         const itemSchema: ISchema = {
         const itemSchema: ISchema = {
           type: 'object',
           type: 'object',
@@ -115,7 +115,7 @@ const BaseInfo = () => {
         );
         );
       })
       })
     ) : (
     ) : (
-      <Empty />
+      <Empty description={'暂无配置'} />
     );
     );
   };
   };