From efc8fbd388282cfe1ee178093059c7df9bc748c1 Mon Sep 17 00:00:00 2001 From: qimengjie Date: Fri, 26 Jul 2019 10:29:51 +0800 Subject: [PATCH] fix: #2 --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index aeb2515..5814dc9 100644 --- a/src/index.js +++ b/src/index.js @@ -120,12 +120,12 @@ Component({ _multiArrayColumn0.push(item[shownFieldName]) } - if (item[shownFieldName] && index === (defaultIndex[columnIndex] || 0)) { + if (isExist(item[shownFieldName]) && index === (defaultIndex[columnIndex] || 0)) { // 选中的索引和值,默认取每列的第0个 multiIndex.push(index) if (columnIndex < steps - 1) { - if (item[subsetFieldName]) { + if (isExist(item[subsetFieldName])) { // 开始处理下一维的数据 const _subsetArr = item[subsetFieldName].map(sub => sub[shownFieldName]) multiArray.push(_subsetArr)