-->

如何更改分组标题的背景色名单煎茶触摸2?(How to change the background

2019-10-17 02:26发布

我有2组的列表。 我想重写列表给该组的标题的默认背景色。 如何更改分组标题的背景色名单煎茶触摸2?

Answer 1:

您可以轻松地通过添加自己的乌尔班到列表中做到这一点,在查找定义使用Chrome开发者工具的标题样式的类名。

CLS添加到列表像

{
    xtype: 'list',
    itemTpl: '<div class="contact2"><strong>{firstName}</strong> {lastName}</div>',
    disclosure: true,
    grouped: true,           
    cls:'customHeader',
    store: store
}

添加下面的CSS样式

.customHeader .x-list-header {
    background-color: red;
    background-image: none;
    border-color: red;
    color: beige;
}

要改变基于模型值这个头彩煎茶小提琴 , 的jsfiddle可能会给你的想法。



文章来源: How to change the background color of the grouped heading in List in sencha touch 2?