Skip to content

Commit

Permalink
修复添加/编辑菜单的时候,不会自动刷新列表问题 (#37)
Browse files Browse the repository at this point in the history
Co-authored-by: zhongshaofa <shaofa.zhong@happy-seed.com>
  • Loading branch information
zhongshaofa and zhongshaofa committed Aug 14, 2020
1 parent b1824f8 commit dda4e3d
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions public/static/admin/js/system/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,15 @@ define(["jquery", "easy-admin", "treetable", "iconPickerFa", "autocomplete"], fu
}
});

ea.listen();
ea.listen(function (data) {
return data;
}, function (res) {
ea.msg.success(res.msg, function () {
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
parent.$('[data-treetable-refresh]').trigger("click");
});
});
},
edit: function () {
iconPickerFa.render({
Expand All @@ -172,7 +180,15 @@ define(["jquery", "easy-admin", "treetable", "iconPickerFa", "autocomplete"], fu
}
});

ea.listen();
ea.listen(function (data) {
return data;
}, function (res) {
ea.msg.success(res.msg, function () {
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
parent.$('[data-treetable-refresh]').trigger("click");
});
});
}
};
return Controller;
Expand Down

0 comments on commit dda4e3d

Please sign in to comment.