|
@@ -212,7 +212,8 @@ function DIYTable(props: IProps) {
|
|
|
for (let index = 0; index < rows.length; index++) {
|
|
|
// 把每一行的数据提出来到一个对象里
|
|
|
if (rows) {
|
|
|
- const row = rows[index];
|
|
|
+ const row = typeof rows[index] === 'string' ? JSON.parse(rows[index]) : rows[index];
|
|
|
+
|
|
|
if (index === 0) {
|
|
|
// 列配置
|
|
|
row.forEach((col: any) => {
|
|
@@ -250,7 +251,7 @@ function DIYTable(props: IProps) {
|
|
|
if (displayOnly) {
|
|
|
for (let index = 0; index < rows.length; index++) {
|
|
|
// 把每一行的数据提出来到一个对象里
|
|
|
- const row = rows[index];
|
|
|
+ const row = typeof rows[index] === 'string' ? JSON.parse(rows[index]) : rows[index];
|
|
|
const rowData: any = {};
|
|
|
if (displayOnly) {
|
|
|
row.forEach((col: any) => {
|