如何删除 Sencha 触摸分组列表标题并增加差距。
问问题
763 次
1 回答
1
为您的列表定义一个自定义类,并将该类的 css 添加到您的 css 文件中。偏离路线,如果您使用商店并添加要分组的所需字段名,则将分组配置选项设置为 true。
看法:
Ext.define('app.view.Temp', {
extend : 'Ext.List',
xtype : 'temp',
config : {
title : 'Temp',
cls : 'x-contacts',
disableSelection: true,
grouped : true,
store : 'YourStore',
ui : 'round',
cls:'modifiedHeader',
//custom css classname
itemTpl : ['<span>{field_name}</span>'].join('')
}
});
店铺:
Ext.define('app.store.YourStore', {
extend : 'Ext.data.Store',
config : {
model : 'app.model.Temp',
autoLoad : true,
storeId:'YourStore',
groupField: 'field_name',
proxy : {
type : 'ajax',
url : 'link/to/api'
}
}
});
应用程序.css
.modifiedHeader .x-list-header {
//your desired css here
display:none;//If you want to hide the header
}
于 2012-11-30T06:59:27.140 回答