有人知道是否有一个 EXTJS 控件可以生成类似于复选框组的项目符号组吗?
如果您想要项目符号列表外观,您可以使用 CSS 自定义复选框组样式,如下例所示
Ext.application({
name: 'BulletListExample',
launch: function () {
Ext.create('Ext.form.Panel', {
title: 'Bullet List Example',
width: 300,
renderTo: Ext.getBody(),
items: [{
xtype: 'checkboxgroup',
columns: 1,
cls: 'bullet-list', // Apply custom CSS class
items: [{
boxLabel: 'Item 1',
name: 'item1'
}, {
boxLabel: 'Item 2',
name: 'item2'
}, {
boxLabel: 'Item 3',
name: 'item3'
},
// Add more items as needed
]
}]
});
}
});
CSS:
.x-form-checkbox-default:before {
content: '\2022';
}
.x-form-cb-checked .x-form-checkbox-default:before {
content: '\2022';
}