EXTJS 6.2.1类似于CheckboxGroup的项目符号组

gajydyqb  于 2024-01-07  发布在  其他
关注(0)|答案(1)|浏览(221)

有人知道是否有一个EXTJS控件可以产生一个类似于复选框组的项目符号组吗?

ki0zmccv

ki0zmccv1#

如果你想要一个项目符号列表的外观,你可以像下面的例子一样使用CSS自定义复选框组样式

  1. Ext.application({
  2. name: 'BulletListExample',
  3. launch: function () {
  4. Ext.create('Ext.form.Panel', {
  5. title: 'Bullet List Example',
  6. width: 300,
  7. renderTo: Ext.getBody(),
  8. items: [{
  9. xtype: 'checkboxgroup',
  10. columns: 1,
  11. cls: 'bullet-list', // Apply custom CSS class
  12. items: [{
  13. boxLabel: 'Item 1',
  14. name: 'item1'
  15. }, {
  16. boxLabel: 'Item 2',
  17. name: 'item2'
  18. }, {
  19. boxLabel: 'Item 3',
  20. name: 'item3'
  21. },
  22. // Add more items as needed
  23. ]
  24. }]
  25. });
  26. }
  27. });

字符串
CSS:

  1. .x-form-checkbox-default:before {
  2. content: '\2022';
  3. }
  4. .x-form-cb-checked .x-form-checkbox-default:before {
  5. content: '\2022';
  6. }

展开查看全部

相关问题