优化分类展开

pull/515/head
Karson 2025-06-03 11:16:19 +08:00
parent ed2f472e35
commit fad64c36f0
2 changed files with 4 additions and 2 deletions

View File

@ -50,7 +50,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function
search: false, search: false,
commonSearch: false, commonSearch: false,
rowAttributes: function (row, index) { rowAttributes: function (row, index) {
return row.pid == 0 ? {} : {style: "display:none"}; var expanded = $(".btn-toggle-all i").hasClass("fa-minus");
return row.pid == 0 || expanded ? {} : {style: "display:none"};
} }
}); });

View File

@ -42,7 +42,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
search: false, search: false,
commonSearch: false, commonSearch: false,
rowAttributes: function (row, index) { rowAttributes: function (row, index) {
return row.pid == 0 ? {} : {style: "display:none"}; var expanded = $(".btn-toggle-all i").hasClass("fa-minus");
return row.pid == 0 || expanded ? {} : {style: "display:none"};
} }
}); });