zoukankan      html  css  js  c++  java
  • 00009

    table :

    var tableIns = table.render({
       elem:'#workTaskLogListTable'
       ,url: ctx+'/task/workTaskLog/query'
       ,error:admin.error
       ,cellMinWidth: 80
       ,toolbar: '#workTaskLogListTable-toolbar'
              ,defaultToolbar: [{
                  title: '条件过滤' //标题
                  ,layEvent: 'searchDiv' //事件名,用于 toolbar 事件中使用
                  ,icon: 'layui-icon-search' //图标类名
              },
                  'filter', 'print', 'exports']
       ,cols: [[
          {type: 'checkbox'/*, fixed: 'left'*/}
          ,{field:'content', title: '日志内容', align: 'center',130 }
          ,{field:'userName', title: '操作人', align: 'center',130 }
          ,{field:'status', title: '状态', align: 'center',130,templet:tplStatus}
          ,{field:'createTime', title: '创建时间', align: 'center',160,templet:tplCreateTime}
          ,{title:'操作', toolbar: '#workTaskLogListTable-bar', 150}
       ]]
       ,page: true
       ,limit: 10
       ,limits: layui.setter.limits
       ,done: function(res, curr, count){
       }
       ,height: 'full-110'
    });
    

    说明:{type: 'checkbox'/, fixed: 'left'/} , 要是功能有效,即表的列 不能有fixed属性。

    调用方法:

    admin.tableRowCheckToggle();
    

    方法体为:

    admin.tableRowCheckToggle = function () {
        $('body').on('click', '.layui-table-body tr', function(e){
            $('.layui-form-checkbox', this).click();
            $('.layui-form-checkbox.layui-form-checked', this.parent).click();
            $('.layui-form-checkbox', this).click();
    
        })
        $('body').on('click', '.layui-form-checkbox', function(e){
            e.stopPropagation();
        })
    }
    
  • 相关阅读:
    关联原理说明
    一个软件测试工程师的学习体验
    缺陷漏测分析:测试过程改进
    自动化测试的7个步骤
    ACM题目————Subsequence
    ACM题目————Aggressive cows
    ACM题目————列变位法解密
    C++TSL之map容器(悲伤的故事)
    ACM题目————二叉树最大宽度和高度
    ACM题目————装箱问题
  • 原文地址:https://www.cnblogs.com/jianquan100/p/12939768.html
Copyright © 2011-2022 走看看