From 51491fb094d1dcb8e6e821323d05d8a696343a55 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 21 Sep 2021 00:40:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=8A=A8watch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/layout.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index b147ae9fe..8093ae5fc 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -31,6 +31,15 @@ BI.Layout = BI.inherit(BI.Widget, { deep: true }); } + if (BI.isFunction(o.rowSize)) { + var rowSizeFn = o.rowSize; + o.rowSize = this.__watch(rowSizeFn, function (context, newValue) { + o.rowSize = newValue; + self.resize(); + }, { + deep: true + }); + } }, _init4Margin: function () {