diff --git a/demo/js/core/abstract/demo.button_group.js b/demo/js/core/abstract/demo.button_group.js index e61a61b0a..21652ad58 100644 --- a/demo/js/core/abstract/demo.button_group.js +++ b/demo/js/core/abstract/demo.button_group.js @@ -7,80 +7,52 @@ Demo.Func = BI.inherit(BI.Widget, { return { type: "bi.vertical", items: [{ - type: "bi.custom_tree", + type: "bi.button_group", ref: function (_ref) { ref = _ref; }, - el: { - type: "bi.button_tree", - chooseType: 0, - layouts: [{ - type: "bi.vertical" - }], - behaviors: { - redmark: function () { - return true; - } + 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([ - { - "type": "bi.multilayer_icon_tree_leaf_item", - "id": 0, - "pId": 100, - "text": "归一化1", - "title": "归一化1", - "value": { - "modelType": 100, - "modelName": "归一化1" - }, - "isParent": false, - "layer": 1 - }, - { - "type": "bi.multilayer_icon_tree_leaf_item", - "id": 1, - "pId": 100, - "text": "标准化1", - "title": "标准化1", - "value": { - "modelType": 100, - "modelName": "标准化1" - }, - "isParent": false, - "layer": 1 + ref.populate([{ + el: { + type: "bi.label", + text: "1" }, - { - "type": "bi.multilayer_icon_tree_leaf_item", - "id": 2, - "pId": 103, - "text": "主成分1", - "title": "主成分1", - "value": { - "modelType": 103, - "modelName": "主成分1" - }, - "isParent": false, - "layer": 1 + height: 50 + }, { + el: { + type: "bi.button", + text: "2" }, - { - "type": "bi.multilayer_icon_tree_leaf_item", - "id": 3, - "pId": 102, - "text": "特征工程1", - "title": "特征工程1", - "value": { - "modelType": 102, - "modelName": "特征工程1" - }, - "isParent": false, - "layer": 1 + height: 50 + }, { + el: { + type: "bi.label", + text: "3" } - ], "t"); + }]); } }] diff --git a/dist/demo.js b/dist/demo.js index 1d6450d31..3e07f8eac 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -4581,80 +4581,52 @@ BI.shortcut("demo.tab", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { return { type: "bi.vertical", items: [{ - type: "bi.custom_tree", + type: "bi.button_group", ref: function (_ref) { ref = _ref; }, - el: { - type: "bi.button_tree", - chooseType: 0, - layouts: [{ - type: "bi.vertical" - }], - behaviors: { - redmark: function () { - return true; - } + 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([ - { - "type": "bi.multilayer_icon_tree_leaf_item", - "id": 0, - "pId": 100, - "text": "归一化1", - "title": "归一化1", - "value": { - "modelType": 100, - "modelName": "归一化1" - }, - "isParent": false, - "layer": 1 - }, - { - "type": "bi.multilayer_icon_tree_leaf_item", - "id": 1, - "pId": 100, - "text": "标准化1", - "title": "标准化1", - "value": { - "modelType": 100, - "modelName": "标准化1" - }, - "isParent": false, - "layer": 1 + ref.populate([{ + el: { + type: "bi.label", + text: "1" }, - { - "type": "bi.multilayer_icon_tree_leaf_item", - "id": 2, - "pId": 103, - "text": "主成分1", - "title": "主成分1", - "value": { - "modelType": 103, - "modelName": "主成分1" - }, - "isParent": false, - "layer": 1 + height: 50 + }, { + el: { + type: "bi.button", + text: "2" }, - { - "type": "bi.multilayer_icon_tree_leaf_item", - "id": 3, - "pId": 102, - "text": "特征工程1", - "title": "特征工程1", - "value": { - "modelType": 102, - "modelName": "特征工程1" - }, - "isParent": false, - "layer": 1 + height: 50 + }, { + el: { + type: "bi.label", + text: "3" } - ], "t"); + }]); } }]