发布全局的栏目订阅

       that.$emitter.emit('on-menu-user', that.menuUser);
            that.$emitter.emit('on-menu-right', that.menuRight);
            that.$emitter.emit('on-menu-footer', that.menuFooter);
            that.$emitter.emit('on-menu-content', that.menuContent);
            that.$emitter.emit('on-menu-topic', that.menuTopic);
            that.$emitter.emit('on-menu-quick', that.menuQuick);
            that.$emitter.emit('on-menu-data', menuT);
            that.$emitter.emit('on-menu-logout', that.menuLogout);
            that.$emitter.emit('on-menu-my-user', that.menuMyUser);
            that.$emitter.emit('on-menu-sys-chat', that.menuChat);
            that.$emitter.emit('on-menu-sys-notice', that.menuNotice);
            that.$emitter.emit('on-menu-recommend', that.menuRecommend);
            that.$emitter.emit('on-menu-tree-data', that.menuTree);

            that.$emitter.emit('on-menu-all-data', {
                data: menuTree, //栏目树形结构数据
                recommend: menuRecommend, //栏目推荐
                menus: menuT, //栏目列表结构数据
                myUser: menuMyUserT, //个人信息
                topic: that.menuTopic, //专题推荐
                quick: that.menuQuick, //快捷方式
                notice: menuNoticeT, //站内通知
                chat: menuChatT, //站内消息
                logout: menuLogoutT //退出
            });

栏目分布说明

{
  "success": true,
  "data": [
    {
      "value": "nav-footer",
      "type": "nav",
      "name": "底部导航"
    },
    {
      "value": "nav-group",
      "type": "nav",
      "name": "左侧栏目更多组"
    },
    {
      "value": "nav-more",
      "type": "nav",
      "name": "左侧更多导航"
    },
    {
      "value": "nav-content",
      "type": "nav",
      "name": "头部内容导航"
    },
    {
      "value": "nav-right",
      "type": "nav",
      "name": "头部右侧导航"
    },
    {
      "value": "nav-user",
      "type": "nav",
      "name": "账号切换"
    },
    {
      "value": "nav-recommend",
      "type": "nav",
      "name": "栏目推荐"
    },
    {
      "value": "nav-sys-notice",
      "type": "nav",
      "name": "站内通知"
    },
    {
      "value": "nav-sys-chat",
      "type": "nav",
      "name": "最新留言"
    },
    {
      "value": "nav-user",
      "type": "nav",
      "name": "账号切换"
    },
    {
      "value": "nav-my-user",
      "type": "nav",
      "name": "个人信息"
    },
    {
      "value": "logout",
      "type": "nav",
      "name": "账号退出"
    },
    {
      "value": "nav-quick",
      "type": "nav",
      "name": "快捷方式"
    },
    {
      "value": "nav-topic",
      "type": "nav",
      "name": "专题推荐"
    }
  ]
}

文档更新时间: 2021-09-28 07:54   作者:admin