From ea14212deeb3a6334939ee414ddbc588b08cdbea Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Wed, 21 Feb 2024 08:39:49 +0800 Subject: [PATCH] update docs --- packages/table/src/methods.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/table/src/methods.js b/packages/table/src/methods.js index 7a395c6f6..c7dfb7a51 100644 --- a/packages/table/src/methods.js +++ b/packages/table/src/methods.js @@ -1374,7 +1374,7 @@ const Methods = { * 只对 tree-config 有效,获取行的父级 */ getParentRow (rowOrRowid) { - const { treeConfig, fullDataRowIdData, treeOpts } = this + const { treeConfig, fullDataRowIdData } = this if (rowOrRowid && treeConfig) { let rowid if (XEUtils.isString(rowOrRowid)) { @@ -1384,15 +1384,7 @@ const Methods = { } if (rowid) { const rest = fullDataRowIdData[rowid] - if (treeOpts.transform) { - const row = rest ? rest.row : null - if (row) { - const parentRowId = row[treeOpts.parentField] - return fullDataRowIdData[parentRowId] ? fullDataRowIdData[parentRowId].row : null - } - } else { - return rest ? rest.parent : null - } + return rest ? rest.parent : null } } return null