把demo的index.html中js全包起来好像也不行(极速模式)
<script type="text/javascript">
window.onunload = function () {
mini.parse();
function onBeforeExpand(e) {
var tree = e.sender;
var nowNode = e.node;
var level = tree.getLevel(nowNode);
var root = tree.getRootNode();
tree.cascadeChild(root, function (node) {
if (tree.isExpandedNode(node)) {
var level2 = tree.getLevel(node);
if (node != nowNode && !tree.isAncestor(node, nowNode) && level == level2) {
tree.collapseNode(node, true);
}
}
});
}
}
</script> 作者: felt 时间: 2020-7-7 09:25:30