From eb0ac796ef78f1d367858b0d2db0ffe8b56a12ea Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 23 Aug 2021 14:43:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/dev.html | 4 ++-- src/core/wrapper/layout.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/dev.html b/examples/dev.html index f4a855b3d..7a11279b2 100644 --- a/examples/dev.html +++ b/examples/dev.html @@ -34,8 +34,8 @@ text: 1 }, { type: "bi.label", - key: "2", - text: 2 + key: "123", + text: "start" }]) } }, { diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index 6f1824b5d..d6634e328 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -486,6 +486,7 @@ BI.Layout = BI.inherit(BI.Widget, { function addNode (vnode, index) { var opt = self._getOptions(vnode); var key = opt.key == null ? index : opt.key; + delete self._children[self._getChildName(index)]; return children[key] = self._addElement(index, vnode); }