Tree Checkbox 半选

ExtJS带复选框的下拉树对复选框中半选状态的实现

亡梦爱人 提交于 2019-12-19 19:17:48
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Extjs基本组件:带复选框的下拉树 首先,我们对于ExtJs实现的带复选框的下拉树应该有一个简单的了解,从下面的例子中可以看出,treepanel是通过节点中checked的值(true,false)来实现复选框的两种状态(勾选,不选)的。 代码段: Ext.create('Ext.window.Window', { title: 'Test', height: 230, width: 400, layout: 'fit', autoShow:true, items: { xtype: 'treepanel', store: Ext.create('Ext.data.TreeStore', { root: { expanded: true, children: [ { text: 'child1', leaf: true, checked: false}, { text: 'child2', expanded: true, checked: false, children: [ { text: 'child2-1', expanded: true, checked: false, children:[ { text: 'child2-1-1', leaf: true, checked: true}, {