mui tree 加载数据前遮罩提示“正在加载,请稍候...”

mui自带的tree绑定数据前没有动作,白屏

datagride绑定数据前是有提示的,很友好

    $(function () {
        $("#treepanel").find("#tt").tree({
            url:'../ajax/ajax_branch.php?act=getlist',
            method:'get',
            animate:true,
            lines:true,
            onContextMenu: function(e,node){
            e.preventDefault();
            $(this).tree('select',node.target);
            $('#mm').menu('show',{
                left: e.pageX,
                top: e.pageY
                });
            },
            onBeforeLoad: function (node, param) {//onBeforeLoad,在请求载入数据之前触发,返回false将取消载入。
                $("<div class=\"datagrid-mask\"></div>").css({display: "block",position:"absolute", width: "500px", height: "400px",left:"7px",top:"7px"}).appendTo("#tt");//这里面的width,height是根据tree的父div决定的,回头找css高手弄成%
                $("<div class=\"datagrid-mask-msg\"></div>").html("正在处理,请稍待。。。").css({position:"relative",left:"170px",top:"200px",width:"140px"}).appendTo("#tt").css({display: "block"});
            }
        });
    });




你可能感兴趣的:(mui tree 加载数据前遮罩提示“正在加载,请稍候...”)