V5.3.10 版本支持自定义菜单
编辑dataviz-web/common/config.js
将showExtendMenu改为true,刷新浏览器缓存,主页面会出现“自定义菜单”选项。
编辑 dataviz-web/src/modules/blocks/nav-xxx.html
修改如下内容,默认3个二级菜单,最多15个二级菜单。
注意,每个ul中有 id, currentState, changeState 一共四处涉及到 menuXX 必须按序号递增,如 menu01,menu02,menu03...。
<li class="abstract" ng-if="app.settings.showExtendMenu" ng-class="{'active': menu1Active && !app.settings.asideFolded, 'opened': menu1Opened && !app.settings.asideFolded}" >
<a id="nav_menu1" href class="auto" ng-click="_czc.push(['_trackEvent','leftNavSide','menu1']);toggleMenu1()">
<i class="dz-icon-link" title="{{'blocks.nav.SETTINGS' | translate }}"></i>
<span class="navItem main-menu-font ellipsis">自定义菜单</span>
<span> <i class="fa fa-angle-right text"></i>
<i class="fa fa-angle-down text-active" style="margin-left: -2px"></i> </span>
</a>
<ul id="nav_menu01_ul" class="nav nav-sub">
<li ng-class="{'active': currentState === 'app.menu01'}" ng-if="userinfo.accountRole===1||userinfo.isOrgAdmin">
<a id="nav_menu01" ng-click="changeState('app.menu01')">
<span class="navItem-sub main-menu-font ellipsis" >子菜单01</span>
</a>
</li>
</ul>
<ul id="nav_menu02_ul" class="nav nav-sub">
<li ng-class="{'active': currentState === 'app.menu02'}" ng-if="userinfo.accountRole===1||userinfo.isOrgAdmin">
<a id="nav_menu02" ng-click="changeState('app.menu02')">
<span class="navItem-sub main-menu-font ellipsis" >子菜单02</span>
</a>
</li>
</ul>
<ul id="nav_menu03_ul" class="nav nav-sub">
<li ng-class="{'active': currentState === 'app.menu03'}" ng-if="userinfo.accountRole===1||userinfo.isOrgAdmin">
<a id="nav_menu03" ng-click="changeState('app.menu03')">
<span class="navItem-sub main-menu-font ellipsis" >子菜单03</span>
</a>
</li>
</ul>
</li>
进入 dataviz-web/src/modules/extendmenu/, 每个目录对应二级菜单的页面,编辑menuXX中的page-***.html 即可。