fix:修复树形菜单元素

This commit is contained in:
Ying
2022-12-21 18:49:06 +08:00
parent c834b46653
commit 1f6415c836
2 changed files with 4 additions and 4 deletions

View File

@@ -177,11 +177,11 @@
tree.render({ tree.render({
id: 'authTree' id: 'authTree'
,elem: '#authTree' ,elem: '#authTree'
,checkids: checkKeys
,data: data ,data: data
,showCheckbox: true ,showCheckbox: true
,oncheck: function(obj){} ,oncheck: function(obj){}
}); });
tree.setChecked('authTree', checkKeys);
// 监听提交 // 监听提交
form.on("submit(submitPage)",function(post){ form.on("submit(submitPage)",function(post){
@@ -250,13 +250,12 @@
tree.render({ tree.render({
id: 'cateTree' id: 'cateTree'
,elem: '#cateTree' ,elem: '#cateTree'
,checkids: checkKeys
,data: data ,data: data
,showCheckbox: true ,showCheckbox: true
,oncheck: function(obj){} ,oncheck: function(obj){}
}); });
tree.setChecked('cateTree', checkKeys);
// 监听提交 // 监听提交
form.on("submit(submitPage)",function(post){ form.on("submit(submitPage)",function(post){
// 获取提交地址 // 获取提交地址

View File

@@ -366,11 +366,12 @@
tree.render({ tree.render({
id: 'authTree', id: 'authTree',
elem: '#authTree', elem: '#authTree',
checkids: tableThis.data[event].length ? tableThis.data[event].map(Number): [],
data: data, data: data,
showCheckbox: true, showCheckbox: true,
}) })
tree.setChecked('authTree', tableThis.data[event].length ? tableThis.data[event].map(Number): []); // tree.setChecked('authTree', tableThis.data[event].length ? tableThis.data[event].map(Number): []);
// 监听权限提交 // 监听权限提交
form.on("submit(submitPage)", function (post) { form.on("submit(submitPage)", function (post) {