From 703e5b47f7a8bddf280d1d896139d34e2a3b033f Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 17 Nov 2020 17:34:12 +0800 Subject: [PATCH] =?UTF-8?q?children=E7=9A=84key=E5=B0=B1=E7=94=A8=E7=B4=A2?= =?UTF-8?q?=E5=BC=95=E6=9B=BF=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/layout.js | 6 +++--- src/core/wrapper/layout/layout.card.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index dc3b972b68..32f4702421 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -83,7 +83,7 @@ BI.Layout = BI.inherit(BI.Widget, { }, _getChildName: function (index) { - return this.getName() + "_" + index; + return "" + index; }, _addElement: function (i, item, context) { @@ -94,7 +94,7 @@ BI.Layout = BI.inherit(BI.Widget, { BI.each(self._children, function (name, child) { if (child === w) { BI.remove(self._children, child); - self.removeItemAt(name.replace(self.getName() + "_", "") | 0); + self.removeItemAt(name | 0); } }); }); @@ -568,7 +568,7 @@ BI.Layout = BI.inherit(BI.Widget, { if (BI.isWidget(nameOrWidget)) { BI.each(this._children, function (name, child) { if (child === nameOrWidget) { - removeIndex = name.replace(self.getName() + "_", ""); + removeIndex = name; } }); } else { diff --git a/src/core/wrapper/layout/layout.card.js b/src/core/wrapper/layout/layout.card.js index b44527270a..f0133de6e9 100644 --- a/src/core/wrapper/layout/layout.card.js +++ b/src/core/wrapper/layout/layout.card.js @@ -196,7 +196,7 @@ BI.CardLayout = BI.inherit(BI.Layout, { if (BI.isWidget(nameOrWidget)) { BI.each(this._children, function (name, child) { if (child === nameOrWidget) { - removeName = name.replace(self.getName() + "_", ""); + removeName = name; } }); } else {