extjs 分页总计问题

u014726465 2015-11-05 02:12:52
PagingToolbar 里面

displayMsg : '共 {2} 条,当前显示 {0} 到 {1} 条',


我想手动修改一下 1 那个位置的 数字,,是不是修改以下方法的 this.cursor+count ,但是我改了 重新注册组件用新组件去做,这个方法一直不走,,,改怎么做啊? 求助一下。。。
updateInfo : function(){
if(this.displayItem){
var count = this.store.getCount();
var msg = count == 0 ?
this.emptyMsg :
String.format(
this.displayMsg,
this.cursor+1, this.cursor+count, this.store.getTotalCount()
);
this.displayItem.setText(msg);
}
},
...全文
137 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
scatking 2015-11-11
  • 打赏
  • 举报
回复
displayMsg : String The paging status message to display. Note that this string is formatted using the braced numbers {0}-{2} as tokens that are replaced by the values for start, end and total respectively. These tokens should be preserved when overriding this string if showing those values is desired. Defaults to: 'Displaying {0} - {1} of {2}' 这个可以configs里面设置的
u014726465 2015-11-08
  • 打赏
  • 举报
回复
引用 2 楼 showbo 的回复:
displayItem是什么组件?Ext.toolbar.Paging?如果是是update方法吧,没有setText方法 http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.toolbar.Paging-method-update
版主大人知道 displayMsg 里面的 0 1 2 是通过 哪个函数设定的吗?
Go 旅城通票 2015-11-05
  • 打赏
  • 举报
回复
displayItem是什么组件?Ext.toolbar.Paging?如果是是update方法吧,没有setText方法 http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.toolbar.Paging-method-update
u014726465 2015-11-05
  • 打赏
  • 举报
回复
求助大神,求大神现身。

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧