扩展 layui table 自动显示隐藏列

分享 未结 精帖
20 4138
舞亦恩
舞亦恩 2018-4-10
悬赏:20飞吻




layui.css中加入了样式
.layui-icon {
font-size: 16px!important
}
.mag0 {
margin: 0!important
}

::selection {
background: #ff5722;
color: #fff
}

.layui-form-switch {
margin-top: 7px!important
}

.x-layer {
display: none;
position: absolute!important;
z-index: 19011;
overflow: hidden
}

.x-menu-body {
font-size: 12px;
background: #f0f0f0!important;
padding: 2px;
border-color: #99bce8;
border-style: solid;
border-width: 1px;
overflow: hidden
}

.x-box-inner {
overflow: hidden;
position: relative;
}

.x-menu-icon-separator {
position: absolute;
top: 0;
left: 27px;
z-index: 0;
border-left: solid 1px #e0e0e0;
width: 2px;
overflow: hidden;
height: 100%
}

.x-menu-item {
white-space: nowrap;
overflow: hidden;
z-index: 1
}

.x-menu-item-link {
display: block;
margin: 1px;
padding: 6px 2px 3px 32px;
text-decoration: none!important;
line-height: 16px;
cursor: default
}

.x-menu-item-checked .x-menu-item-icon {
background-image: url(../images/checked.gif)
}

.x-menu-item-unchecked .x-menu-item-icon {
background-image: url(../images/unchecked.gif)
}

.x-menu-item-icon {
width: 16px;
height: 16px;
position: absolute;
left: 4px;
background: no-repeat center center
}
layui\images中添加了2张图片



修改了table.js






大家一起学习进步!
回帖