优化 tree 容器样式,以解决用于其他组件内部可能造成的样式异常问题

pull/1315/head
贤心 1 year ago
parent e42b687393
commit 1ab1a45e3a

@ -1551,7 +1551,7 @@ body .layui-util-face .layui-layer-content{padding:0; background-color:#fff; co
.layui-tree-pack{display: none; padding-left: 20px; position: relative;} .layui-tree-pack{display: none; padding-left: 20px; position: relative;}
.layui-tree-line .layui-tree-pack{padding-left: 27px;} .layui-tree-line .layui-tree-pack{padding-left: 27px;}
.layui-tree-line .layui-tree-set .layui-tree-set:after{content: ""; position: absolute; top: 14px; left: -9px; width: 17px; height: 0; border-top: 1px dotted #c0c4cc;} .layui-tree-line .layui-tree-set .layui-tree-set:after{content: ""; position: absolute; top: 14px; left: -9px; width: 17px; height: 0; border-top: 1px dotted #c0c4cc;}
.layui-tree-entry{position: relative; padding: 3px 0; height: 20px; white-space: nowrap;} .layui-tree-entry{position: relative; padding: 3px 0; height: 26px; white-space: nowrap;}
.layui-tree-entry:hover{background-color: #eee;} .layui-tree-entry:hover{background-color: #eee;}
.layui-tree-line .layui-tree-entry:hover{background-color: rgba(0,0,0,0);} .layui-tree-line .layui-tree-entry:hover{background-color: rgba(0,0,0,0);}
.layui-tree-line .layui-tree-entry:hover .layui-tree-txt{color: #999; text-decoration: underline; transition: 0.3s;} .layui-tree-line .layui-tree-entry:hover .layui-tree-txt{color: #999; text-decoration: underline; transition: 0.3s;}
@ -1560,7 +1560,7 @@ body .layui-util-face .layui-layer-content{padding:0; background-color:#fff; co
.layui-tree-line .layui-tree-set.layui-tree-setLineShort:before{height: 13px;} .layui-tree-line .layui-tree-set.layui-tree-setLineShort:before{height: 13px;}
.layui-tree-line .layui-tree-set.layui-tree-setHide:before{height: 0;} .layui-tree-line .layui-tree-set.layui-tree-setHide:before{height: 0;}
.layui-tree-iconClick{display: inline-block; vertical-align: middle; position: relative; height: 20px; line-height: 20px; margin: 0 10px; color: #c0c4cc;} .layui-tree-iconClick{display: inline-block; vertical-align: middle; position: relative; height: 20px; line-height: 20px; margin: 0 10px; color: #c0c4cc;}
.layui-tree-icon{height: 12px; line-height: 12px; width: 12px; text-align: center; border: 1px solid #c0c4cc;} .layui-tree-icon{height: 14px; line-height: 12px; width: 14px; text-align: center; border: 1px solid #c0c4cc;}
.layui-tree-iconClick .layui-icon{font-size: 18px;} .layui-tree-iconClick .layui-icon{font-size: 18px;}
.layui-tree-icon .layui-icon{font-size: 12px; color: #5F5F5F;} .layui-tree-icon .layui-icon{font-size: 12px; color: #5F5F5F;}
.layui-tree-iconArrow{padding: 0 5px;} .layui-tree-iconArrow{padding: 0 5px;}
@ -1572,7 +1572,7 @@ body .layui-util-face .layui-layer-content{padding:0; background-color:#fff; co
.layui-tree-btnGroup .layui-icon{display: inline-block; vertical-align: middle; padding: 0 2px; cursor: pointer;} .layui-tree-btnGroup .layui-icon{display: inline-block; vertical-align: middle; padding: 0 2px; cursor: pointer;}
.layui-tree-btnGroup .layui-icon:hover{color: #999; transition: 0.3s;} .layui-tree-btnGroup .layui-icon:hover{color: #999; transition: 0.3s;}
.layui-tree-entry:hover .layui-tree-btnGroup{visibility: visible;} .layui-tree-entry:hover .layui-tree-btnGroup{visibility: visible;}
.layui-tree-editInput{position: relative; display: inline-block; vertical-align: middle; height: 20px; line-height: 20px; padding: 0 3px; border: none; background-color: rgba(0,0,0,0.05);} .layui-tree-editInput{position: relative; display: inline-block; vertical-align: middle; height: 20px; line-height: 20px; padding: 0; border: none; background-color: rgba(0,0,0,0.05);}
.layui-tree-emptyText{text-align: center; color: #999;} .layui-tree-emptyText{text-align: center; color: #999;}

@ -125,7 +125,7 @@ layui.define('form', function(exports){
that.checkids = []; that.checkids = [];
var temp = $('<div class="layui-tree'+ (options.showCheckbox ? " layui-form" : "") + (options.showLine ? " layui-tree-line" : "") +'" lay-filter="LAY-tree-'+ that.index +'"></div>'); var temp = $('<div class="layui-tree layui-border-box'+ (options.showCheckbox ? " layui-form" : "") + (options.showLine ? " layui-tree-line" : "") +'" lay-filter="LAY-tree-'+ that.index +'"></div>');
that.tree(temp); that.tree(temp);
var othis = options.elem = $(options.elem); var othis = options.elem = $(options.elem);

Loading…
Cancel
Save