Commit caf3e7b1 by 姜雷

修复导航栏隐藏菜单

parent eb0ce0f1
......@@ -10,6 +10,12 @@ Vue.use(Router);
export const routerMap = [
{ path: '/', name: 'Home', component: Home, meta: { title: '首页' } },
{
path: '/home2',
name: 'HomeT',
component: Home,
meta: { title: '首页', hidden: true },
},
{
path: '/DatePicker',
name: 'DatePicker',
component: DatePicker,
......
......@@ -18396,12 +18396,12 @@ var lib_menu_default = /*#__PURE__*/__webpack_require__.n(lib_menu);
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules//.cache//vue-loader","cacheIdentifier":"157995c4-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sidebar/SidebarItem.vue?vue&type=template&id=164a769b&
var SidebarItemvue_type_template_id_164a769b_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"menu-wrapper"},[_vm._l((_vm.routes),function(item){return [(!item.hidden&&item.children)?_c('el-submenu',{key:item.name,attrs:{"index":item.name||item.path}},[_c('template',{slot:"title"},[(item.meta&&item.meta.icon)?_c('img-icon',{attrs:{"iconName":item.meta.icon}}):_vm._e(),(item.meta&&item.meta.title)?_c('span',[_vm._v(_vm._s(item.meta.title))]):_vm._e()],1),_vm._l((item.children),function(child){return [(!child.hidden)?[(child.children&&child.children.length>0)?_c('sidebar-item',{key:child.path,staticClass:"nest-menu",attrs:{"is-nest":true,"routes":[child]}}):_c('router-link',{key:child.name,attrs:{"to":item.path+'/'+child.path}},[_c('el-menu-item',{attrs:{"index":item.path+'/'+child.path}},[(child.meta&&child.meta.title)?_c('span',[_vm._v(_vm._s(child.meta.title))]):_vm._e(),_c('span',{staticClass:"menu-arrow"})])],1)]:_vm._e()]})],2):_c('router-link',{key:item.name,attrs:{"to":item.path}},[_c('el-menu-item',{attrs:{"index":item.path}},[(item.meta&&item.meta.title)?_c('span',[_vm._v(_vm._s(item.meta.title))]):_vm._e(),_c('span',{staticClass:"menu-arrow"})])],1)]})],2)}
var SidebarItemvue_type_template_id_164a769b_staticRenderFns = []
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules//.cache//vue-loader","cacheIdentifier":"157995c4-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sidebar/SidebarItem.vue?vue&type=template&id=1d13d80f&
var SidebarItemvue_type_template_id_1d13d80f_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"menu-wrapper"},[_vm._l((_vm.routes),function(item){return [(!item.meta.hidden&&item.children)?_c('el-submenu',{key:item.name,attrs:{"index":item.name||item.path}},[_c('template',{slot:"title"},[(item.meta&&item.meta.icon)?_c('img-icon',{attrs:{"iconName":item.meta.icon}}):_vm._e(),(item.meta&&item.meta.title)?_c('span',[_vm._v(_vm._s(item.meta.title))]):_vm._e()],1),_vm._l((item.children),function(child){return [(!child.meta.hidden)?[(child.children&&child.children.length>0)?_c('sidebar-item',{key:child.path,staticClass:"nest-menu",attrs:{"is-nest":true,"routes":[child]}}):_c('router-link',{key:child.name,attrs:{"to":item.path+'/'+child.path}},[_c('el-menu-item',{attrs:{"index":item.path+'/'+child.path}},[(child.meta&&child.meta.title)?_c('span',[_vm._v(_vm._s(child.meta.title))]):_vm._e(),_c('span',{staticClass:"menu-arrow"})])],1)]:_vm._e()]})],2):(!item.meta.hidden)?_c('router-link',{key:item.name,attrs:{"to":item.path}},[_c('el-menu-item',{attrs:{"index":item.path}},[(item.meta&&item.meta.title)?_c('span',[_vm._v(_vm._s(item.meta.title))]):_vm._e(),_c('span',{staticClass:"menu-arrow"})])],1):_vm._e()]})],2)}
var SidebarItemvue_type_template_id_1d13d80f_staticRenderFns = []
// CONCATENATED MODULE: ./src/components/Sidebar/SidebarItem.vue?vue&type=template&id=164a769b&
// CONCATENATED MODULE: ./src/components/Sidebar/SidebarItem.vue?vue&type=template&id=1d13d80f&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sidebar/SidebarItem.vue?vue&type=script&lang=js&
//
......@@ -18489,8 +18489,8 @@ var SidebarItemvue_type_style_index_0_lang_scss_ = __webpack_require__("6356");
var SidebarItem_component = normalizeComponent(
Sidebar_SidebarItemvue_type_script_lang_js_,
SidebarItemvue_type_template_id_164a769b_render,
SidebarItemvue_type_template_id_164a769b_staticRenderFns,
SidebarItemvue_type_template_id_1d13d80f_render,
SidebarItemvue_type_template_id_1d13d80f_staticRenderFns,
false,
null,
null,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -18405,12 +18405,12 @@ var lib_menu_default = /*#__PURE__*/__webpack_require__.n(lib_menu);
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules//.cache//vue-loader","cacheIdentifier":"157995c4-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sidebar/SidebarItem.vue?vue&type=template&id=164a769b&
var SidebarItemvue_type_template_id_164a769b_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"menu-wrapper"},[_vm._l((_vm.routes),function(item){return [(!item.hidden&&item.children)?_c('el-submenu',{key:item.name,attrs:{"index":item.name||item.path}},[_c('template',{slot:"title"},[(item.meta&&item.meta.icon)?_c('img-icon',{attrs:{"iconName":item.meta.icon}}):_vm._e(),(item.meta&&item.meta.title)?_c('span',[_vm._v(_vm._s(item.meta.title))]):_vm._e()],1),_vm._l((item.children),function(child){return [(!child.hidden)?[(child.children&&child.children.length>0)?_c('sidebar-item',{key:child.path,staticClass:"nest-menu",attrs:{"is-nest":true,"routes":[child]}}):_c('router-link',{key:child.name,attrs:{"to":item.path+'/'+child.path}},[_c('el-menu-item',{attrs:{"index":item.path+'/'+child.path}},[(child.meta&&child.meta.title)?_c('span',[_vm._v(_vm._s(child.meta.title))]):_vm._e(),_c('span',{staticClass:"menu-arrow"})])],1)]:_vm._e()]})],2):_c('router-link',{key:item.name,attrs:{"to":item.path}},[_c('el-menu-item',{attrs:{"index":item.path}},[(item.meta&&item.meta.title)?_c('span',[_vm._v(_vm._s(item.meta.title))]):_vm._e(),_c('span',{staticClass:"menu-arrow"})])],1)]})],2)}
var SidebarItemvue_type_template_id_164a769b_staticRenderFns = []
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules//.cache//vue-loader","cacheIdentifier":"157995c4-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sidebar/SidebarItem.vue?vue&type=template&id=1d13d80f&
var SidebarItemvue_type_template_id_1d13d80f_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"menu-wrapper"},[_vm._l((_vm.routes),function(item){return [(!item.meta.hidden&&item.children)?_c('el-submenu',{key:item.name,attrs:{"index":item.name||item.path}},[_c('template',{slot:"title"},[(item.meta&&item.meta.icon)?_c('img-icon',{attrs:{"iconName":item.meta.icon}}):_vm._e(),(item.meta&&item.meta.title)?_c('span',[_vm._v(_vm._s(item.meta.title))]):_vm._e()],1),_vm._l((item.children),function(child){return [(!child.meta.hidden)?[(child.children&&child.children.length>0)?_c('sidebar-item',{key:child.path,staticClass:"nest-menu",attrs:{"is-nest":true,"routes":[child]}}):_c('router-link',{key:child.name,attrs:{"to":item.path+'/'+child.path}},[_c('el-menu-item',{attrs:{"index":item.path+'/'+child.path}},[(child.meta&&child.meta.title)?_c('span',[_vm._v(_vm._s(child.meta.title))]):_vm._e(),_c('span',{staticClass:"menu-arrow"})])],1)]:_vm._e()]})],2):(!item.meta.hidden)?_c('router-link',{key:item.name,attrs:{"to":item.path}},[_c('el-menu-item',{attrs:{"index":item.path}},[(item.meta&&item.meta.title)?_c('span',[_vm._v(_vm._s(item.meta.title))]):_vm._e(),_c('span',{staticClass:"menu-arrow"})])],1):_vm._e()]})],2)}
var SidebarItemvue_type_template_id_1d13d80f_staticRenderFns = []
// CONCATENATED MODULE: ./src/components/Sidebar/SidebarItem.vue?vue&type=template&id=164a769b&
// CONCATENATED MODULE: ./src/components/Sidebar/SidebarItem.vue?vue&type=template&id=1d13d80f&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Sidebar/SidebarItem.vue?vue&type=script&lang=js&
//
......@@ -18498,8 +18498,8 @@ var SidebarItemvue_type_style_index_0_lang_scss_ = __webpack_require__("6356");
var SidebarItem_component = normalizeComponent(
Sidebar_SidebarItemvue_type_script_lang_js_,
SidebarItemvue_type_template_id_164a769b_render,
SidebarItemvue_type_template_id_164a769b_staticRenderFns,
SidebarItemvue_type_template_id_1d13d80f_render,
SidebarItemvue_type_template_id_1d13d80f_staticRenderFns,
false,
null,
null,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "rym-element-ui",
"version": "0.1.5",
"version": "0.1.6",
"description": "任意门组件库",
"main": "lib/rymUi.common.js",
"scripts": {
......
......@@ -2,7 +2,7 @@
<div class="menu-wrapper">
<template v-for="item in routes">
<el-submenu
v-if="!item.hidden&&item.children"
v-if="!item.meta.hidden&&item.children"
:index="item.name||item.path"
:key="item.name"
>
......@@ -15,7 +15,7 @@
</template>
<template v-for="child in item.children">
<template v-if="!child.hidden">
<template v-if="!child.meta.hidden">
<sidebar-item
:is-nest="true"
class="nest-menu"
......@@ -42,7 +42,7 @@
</template>
</el-submenu>
<router-link
v-else
v-else-if="!item.meta.hidden"
:key="item.name"
:to="item.path"
>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment