From 915969448abf92defe45c11f3f28df7722da3e79 Mon Sep 17 00:00:00 2001 From: jhs1873 Date: Fri, 15 Oct 2021 13:30:17 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Table=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Catch/Table/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/Catch/Table/index.vue b/src/components/Catch/Table/index.vue index 40a78e4..0472c9c 100644 --- a/src/components/Catch/Table/index.vue +++ b/src/components/Catch/Table/index.vue @@ -254,6 +254,14 @@ export default { ? this.getRenderValue(scope, configItem, { name: renderName, type: 'bind' }) : this.getRenderValue(scope, configItem)*/ } + let isArrayProp = prop.indexOf('.') + let newProp = prop + if (isArrayProp >= 1) { + newProp = prop.split(".") + if (scope.row[newProp[0]]) { + return scope.row[newProp[0]][newProp[1]] + } + } return scope.row[prop] }, getRenderValue(scope, item, fn = { name: 'render', type: 'call' }) { -- Gitee