Переглянути джерело

修复表单没填信息时报错的问题

xujunjie 1 рік тому
батько
коміт
406469bfd2
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      src/components/DDComponents/DIYTable/index.tsx

+ 2 - 0
src/components/DDComponents/DIYTable/index.tsx

@@ -253,6 +253,8 @@ function DIYTable(props: IProps) {
           // 把每一行的数据提出来到一个对象里
           const row = typeof rows[index] === 'string' ? JSON.parse(rows[index]) : rows[index];
           const rowData: any = {};
+
+          if (!row) break;
           if (displayOnly) {
             row.forEach((col: any) => {
               if (col) {