优化角色组权限规则树显示

pull/516/MERGE
Karson 2026-01-13 11:12:23 +08:00
parent 10150d7f13
commit cbc3477cb4
3 changed files with 37 additions and 32 deletions

View File

@ -926,30 +926,26 @@ form.form-horizontal .control-label {
display: block;
clear: both;
}
#treeview .jstree-leaf:not(:first-child) {
#treeview [data-vertical="true"] .jstree-leaf:not(:first-child) {
float: left;
background: none;
margin-left: 0;
min-width: 80px;
clear: none;
}
#treeview .jstree-leaf {
#treeview [data-vertical="true"] .jstree-leaf {
float: left;
background: none;
margin-left: 0;
padding-left: 24px;
min-width: 80px;
clear: none;
color: #777;
color: #999;
}
#treeview .jstree-leaf > .jstree-icon,
#treeview .jstree-leaf .jstree-themeicon {
#treeview [data-vertical="true"] .jstree-leaf > .jstree-icon,
#treeview [data-vertical="true"] .jstree-leaf .jstree-themeicon {
display: none;
}
#treeview .jstree-last {
background-image: url("../img/32px.png");
background-position: -292px -4px;
background-repeat: repeat-y;
}
#treeview .jstree-children:before,
#treeview .jstree-children:after {
content: " ";

View File

@ -119,6 +119,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'], function (
.on('redraw.jstree', function (e) {
$(".layer-footer").attr("domrefresh", Math.random());
})
.on('before_open.jstree.jstree', function (e, node) {
if (node.node.children.length > 0 && node.node.children.length === node.node.children_d.length) {
node.node.li_attr['data-vertical'] = true;
$("#" + node.node.id).attr("data-vertical", true);
}
})
.jstree({
"themes": {"stripes": true},
"checkbox": {

View File

@ -842,31 +842,34 @@ form.form-horizontal .control-label {
clear: both;
}
.jstree-leaf:not(:first-child) {
float: left;
background: none;
margin-left: 0;
min-width: 80px;
clear: none;
}
[data-vertical="true"] {
.jstree-leaf {
float: left;
margin-left: 0;
padding-left: 24px;
min-width: 80px;
clear: none;
color: #777;
}
.jstree-leaf:not(:first-child) {
float: left;
background: none;
margin-left: 0;
min-width: 80px;
clear: none;
}
.jstree-leaf > .jstree-icon, .jstree-leaf .jstree-themeicon {
display: none;
}
.jstree-leaf {
float: left;
background: none;
margin-left: 0;
padding-left: 24px;
min-width: 80px;
clear: none;
color: #999;
}
.jstree-leaf > .jstree-icon, .jstree-leaf .jstree-themeicon {
display: none;
}
.jstree-last {
}
.jstree-last {
background-image: url("../img/32px.png");
background-position: -292px -4px;
background-repeat: repeat-y;
}
.jstree-children {