layui实现动态多级菜单

common.js

var configData = {
    // 菜单
    , menu: {
        title: '管理员'
        , defaulturl: 'view/shipxy/console.html'
        , child: [
            {
                isexpand: true
                , tips: '基础数据'
                , showname: '基础数据'
                , dataname: 'basedata'
                , icon: 'layui-icon-app'
                , subchild:[
                    {
                        isexpand: true
                        , tips: '提单'
                        , showname: '提单'
                        , dataname: 'basedata/bl'
                        , url: 'view/shipxy/console.html'
                    }
                ]
            },
            {
                isexpand: false
                , tips: '合作公司'
                , showname: '合作公司'
                , dataname: 'partner'
                , icon: 'layui-icon-app'
                , subchild: [
                    {
                        isexpand: false
                        , tips: '中国外运'
                        , showname: '中国外运'
                        , dataname: 'partner_sinotrans'
                        , subchild: [
                            {
                                showname: '配船通知'
                                , dataname: 'partner_sinotrans_pctz'
                                , url: 'view/partner/sinotrans/pctz.html'
                            },
                            {
                                showname: '每日订舱箱量统计汇总'
                                , dataname: 'partner_sinotrans_dcxl'
                                , url: 'view/partner/sinotrans/dcxl.html'
                            },
                    }
                ]
            },
            {
                isexpand: false
                , tips: '船公司'
                , showname: '船公司'
                , dataname: 'shipcompany'
                , icon: 'layui-icon-app'
                , subchild: [
                    {
                        isexpand: false
                        , tips: '法国达飞CMA 地址:https://www.cma-cgm.com'
                        , showname: '法国达飞CMA'
                        , dataname: 'shipcompany_cma'
                        , subchild: [
                            {
                                showname: '提单与集装箱'
                                , dataname: 'shipcompany_cma_billLoading'
                                , url: 'view/shipcompany/cma/billLoading.html'
                            },
                            {
                                showname: '集装箱物流状态'
                                , dataname: 'shipcompany_cma_movesDetail'
                                , url: 'view/shipcompany/cma/movesDetail.html'
                            }
                        ]
                    },
                    {
                        isexpand: false
                        ,tips:'海丰SITC 地址:http://www.sitcline.com'
                        , showname: '海丰SITC'
                        , dataname: 'shipcompany_sitc'
                        , subchild: [
                            {
                                showname: '集装箱物流状态'
                                , dataname: 'shipcompany_sitc_cargoTracking'
                                , url: 'view/shipcompany/sitc/cargoTracking.html'
                            }
                        ]
                    },
                    
                ]
            },
           
        ]
    }
}

你可能感兴趣的:(LayUI)