jquery表格插件Bootstrap Table

所属分类:UI-图表

 786767  521  查看评论 (37)
分享到微信朋友圈
X
jquery表格插件Bootstrap Table ie兼容9

详细用法请查看demo,说明很详细。

2016-10-26更新(修改演示文件错误,和下载文件中引用地址错误问题)

注:加载了外部json文件,本地预览会有跨域问题,需要在服务端运行。

以下由晨之风-提供

Bug描述

用标签属性方式设置字段formatter时,发现没有效果:
如:<th data-field="sex" data-formatter="format_sex">性别</th>

原因:

bootstrap-table.js第399行,代码中只判断了formatter typeof 为function的情况


解决办法:

修改第399行代码块:

修改前

if (typeof that.header.formatters[j] === 'function') {
    value = that.header.formatters[j](value, item);
}

修改后:

if (typeof that.header.formatters[j] === 'function') {
                    value = that.header.formatters[j](value, item);
                }else if(typeof that.header.formatters[j] === 'string') {
                	if(typeof window[that.header.formatters[j]] === 'function') {
                		value = window[that.header.formatters[j]](value, item);
                	}
                }
相关插件-图表

jQuery 7种冻结行列合并表格

对表格分别进行首行冻结,首列冻结,多行列冻结,合并单元格等
  图表
 31682  342

layui使用datatableajax请求json渲染数据

基于layui,datatable.js。将datatable扩展成可以使用layui的调用方式调用的插件。当然如果想单独使用的话,将layui扩展去掉即可,可自行百度layui。
  图表
 74644  408

类似芝麻信用占比的插件

这是一块款信用占比的插件
  图表
 25502  375

AmChart使用例子

AmChart统计图插件使用例子
  图表
 35083  397

讨论这个项目(37)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    麋鹿 0
    2018/7/27 15:02:43
    想把表头的复选框换为汉字,下面表体的第一列都为复选框?该怎么改 回复
    李白不白 0
    2018/7/17 15:39:35
    挂个简单的代理跑就行了 回复
    玄涅 0
    2018/4/9 12:02:31
    A Nobody 0
    2018/2/6 23:05:48
    表格内容溢高度(底部滚动条)出来了,你们碰到这样的问题吗? 回复
    时光机的完美记忆 0
    2017/9/8 11:17:35

    表头列太多,怎么可以左右滑动显示?

    回复
    见你,人群中 0
    2017/7/28 17:02:17
    引入中文初始文件报错为什么呀
        王林0
        2017/8/22 15:56:14
        我也是,请问怎么解决
    回复
    joker 0
    2016/10/26 19:10:28
    404?
        A Nobody0
        2018/2/6 23:06:56
        把json文件引入,换成你的json文件
    回复
    落叶归根 0
    2016/10/25 16:10:11
    ┿ 阿 鹏 . 0
    2016/7/18 11:07:01
    springData 0
    2016/7/15 15:07:19
    什么效果也没有什么玩意 回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复