|
网上有一种乱七八糟的 处理方法, 我个人觉得没必要, 胖爷我把 表格左上角的 全选 checkbox 遮住不就好了, 具体的就是在table 渲染的 down里 加个方法,这方法的目的是加个span 遮住 select- // 左侧搜索表格初始化
- table.render({
- elem: '#lm-left-table'
- , url: '/dtype'
- , cols: [[
- { type: 'checkbox' }
- , { field: 'mtype', width: 100, title: '类似群', sort: true }
- , { field: 'ctype', width: 80, title: '类别', sort: true }
- , { field: 'xtype', width: 120, title: '商品编号', sort: true }
- , { field: 'spfw', title: '商品名称' }
- , { field: 'datatype', width: 110, title: '商品类型' }
- ]]
- , page: true
- , limit: 20
- , done:function(){
- $('th div.laytable-cell-checkbox').css('position','relative')
- $('th div.laytable-cell-checkbox').append('<span id="lm-msk"></span>')
- $('#lm-msk').css({
- 'width':'100%'
- ,'height':'100%'
- ,'position':'absolute'
- ,'top':'0'
- ,'left':'0'
- ,'z-index':'999'
- ,'background-color':'#f2f2f2'
- })
- }
- });
复制代码 怕自己忘了, 提醒我自己一下 不用加css样式 直接这个 done 复制粘贴过来
|
|