All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.ams.load.router.LoadRouterBlockFlow.js Maven / Gradle / Ivy

function LoadRouterBlockFlow(context){
    const routerArray = quickams.checkData(context, "routerArray");

    let routerBlock = {
        "type": "router",
        "router": {
            "defaultBreadcrumb": false,
            "routes": routerArray
        },
        "on": {
            beforeEach(to, from, next){
                //TODO 从这里继续,处理定时刷新问题
                for(let prop in ams.blocks){
                    let block = ams.blocks[prop];
                    if(block["type"]==="list"&&block.hasOwnProperty("actions")){
                        if(block["actions"].hasOwnProperty("cancelListen")&&from["name"]===blockNameMap[prop]){
                            ams.callAction(prop+".cancelListen");
                        }
                    }
                }
                next();
            },
        }
    };
    ams.block("routerBlock", routerBlock);
    ams.render("routerBlock");
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy