From 4818b99ec3dd75bb77591d63cb4411fcf9aa18c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joker=2EWang-=E7=8E=8B=E9=A1=BA?= Date: Wed, 14 Dec 2022 12:16:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BF=98=E5=8E=9Fdemo=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/core/abstract/demo.button_group.js | 103 ++++++++++----------- 1 file changed, 47 insertions(+), 56 deletions(-) diff --git a/demo/js/core/abstract/demo.button_group.js b/demo/js/core/abstract/demo.button_group.js index 059b97847..21652ad58 100644 --- a/demo/js/core/abstract/demo.button_group.js +++ b/demo/js/core/abstract/demo.button_group.js @@ -7,63 +7,54 @@ Demo.Func = BI.inherit(BI.Widget, { return { type: "bi.vertical", items: [{ - type: "bi.a", - el: { - type: "bi.label", - text: "这就是一个百度超链" + type: "bi.button_group", + ref: function (_ref) { + ref = _ref; }, - href: "https://www.baidu.com" - }], - // type: "bi.vertical", - // items: [{ - // type: "bi.button_group", - // ref: function (_ref) { - // ref = _ref; - // }, - // chooseType: BI.ButtonGroup.CHOOSE_TYPE_NONE, - // layouts: [{ - // type: "bi.vertical", - // items: [{ - // type: "bi.vtape", - // height: 200 - // }] - // }], - // items: [{ - // el: { - // type: "bi.label", - // text: "button_group是一类具有相同属性或相似属性的抽象, 本案例实现的是布局的嵌套(vertical布局下内嵌center_adapt布局)" - // }, - // height: 150 - // }, { - // el: { - // type: "bi.button", - // text: "1" - // } - // }] - // }, { - // type: "bi.button", - // text: "populate", - // handler: function () { - // ref.populate([{ - // el: { - // type: "bi.label", - // text: "1" - // }, - // height: 50 - // }, { - // el: { - // type: "bi.button", - // text: "2" - // }, - // height: 50 - // }, { - // el: { - // type: "bi.label", - // text: "3" - // } - // }]); - // } - // }] + chooseType: BI.ButtonGroup.CHOOSE_TYPE_NONE, + layouts: [{ + type: "bi.vertical", + items: [{ + type: "bi.vtape", + height: 200 + }] + }], + items: [{ + el: { + type: "bi.label", + text: "button_group是一类具有相同属性或相似属性的抽象, 本案例实现的是布局的嵌套(vertical布局下内嵌center_adapt布局)" + }, + height: 150 + }, { + el: { + type: "bi.button", + text: "1" + } + }] + }, { + type: "bi.button", + text: "populate", + handler: function () { + ref.populate([{ + el: { + type: "bi.label", + text: "1" + }, + height: 50 + }, { + el: { + type: "bi.button", + text: "2" + }, + height: 50 + }, { + el: { + type: "bi.label", + text: "3" + } + }]); + } + }] }; }