Просмотр исходного кода

fix(product): fix product baseInfo

Lind 4 лет назад
Родитель
Сommit
5620012666
1 измененных файлов с 2 добавлено и 2 удалено
  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={'暂无配置'} />
     );
   };