From 5edddae2f00ed3ecec5cca731f969088cf461803 Mon Sep 17 00:00:00 2001 From: zora-han Date: Wed, 10 Jan 2018 13:46:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E8=8E=B7=E5=8F=96=E8=A2=AB?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E8=A1=8C=E4=BF=A1=E6=81=AF=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在data里面就没有存储过rowId或者id,所以除了在选择标题行时,返回的congfig是唯一的,其余行config返回的rowId均为undefined,所以改为直接判断rowIndex从而赋值给congif.rowId即可 --- dist/lib/datagrid/zui.datagrid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/lib/datagrid/zui.datagrid.js b/dist/lib/datagrid/zui.datagrid.js index 1a1ace41a6..1410329ec1 100644 --- a/dist/lib/datagrid/zui.datagrid.js +++ b/dist/lib/datagrid/zui.datagrid.js @@ -1181,7 +1181,7 @@ } var dataItem = rowIndex > 0 ? that.getDataItem(rowIndex - 1) : null; config.data = dataItem; - config.rowId = dataItem ? (dataItem.rowId || dataItem.id) : (rowIndex === 0 ? '#header' : rowIndex); + config.rowId = rowIndex === 0 ? '#header' : rowIndex; return config; };