菜单表格树第一级默认不展开

pull/79/head
RuoYi 6 years ago
parent e26b65459e
commit d066bf022b

@ -103,9 +103,11 @@ $(function() {
}).bind("input propertychange", $.tree.searchNode); }).bind("input propertychange", $.tree.searchNode);
} }
// tree表格树 展开/折叠 // tree表格树 展开/折叠
var expandFlag = false; var expandFlag;
$("#expandAllBtn").click(function() { $("#expandAllBtn").click(function() {
if (expandFlag) { var dataExpand = $.common.isEmpty($.table._option.expandAll) ? true : $.table._option.expandAll;
expandFlag = $.common.isEmpty(expandFlag) ? dataExpand : expandFlag;
if (!expandFlag) {
$('#' + $.table._option.id).bootstrapTreeTable('expandAll'); $('#' + $.table._option.id).bootstrapTreeTable('expandAll');
} else { } else {
$('#' + $.table._option.id).bootstrapTreeTable('collapseAll'); $('#' + $.table._option.id).bootstrapTreeTable('collapseAll');

@ -59,7 +59,7 @@
parentCode: "parentId", parentCode: "parentId",
uniqueId: "menuId", uniqueId: "menuId",
expandAll: false, expandAll: false,
expandFirst: true, expandFirst: false,
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add/{id}", createUrl: prefix + "/add/{id}",
updateUrl: prefix + "/edit/{id}", updateUrl: prefix + "/edit/{id}",

Loading…
Cancel
Save