bd-menus-lib
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -273,4 +273,4 @@ module.exports = | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c3c3599-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!./packages/template/menu/Menu.vue?vue&type=template&id=52e0adca& | ||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"menu",style:({ color: _vm.colorTxt })},[(_vm.top)?_c('section',{staticClass:"header",style:({ background: _vm.bgc })},[_c('section',{staticClass:"logo",style:({ width: _vm.logoClient }),on:{"click":_vm.handeleLogo}},[_c('img',{attrs:{"src":_vm.imgSrc}})]),_c('section',{staticClass:"headerMenu"},[_c('el-menu',{staticClass:"el-menu-demo",attrs:{"default-active":_vm.root,"mode":_vm.horizontalShow,"background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":"","unique-opened":true}},[(_vm.topMenu && !_vm.leftMenu && _vm.goShow)?[_c('menu-list',{attrs:{"navMenus":_vm.mainMenu}})]:[_vm._l((_vm.mainMenu),function(item,key){return [(item.children.length > 0)?[_c('el-submenu',{key:key,attrs:{"index":key + ''}},[_c('template',{slot:"title"},[(item.icon)?_c('img',{staticClass:"bd-icon",attrs:{"src":item.icon,"alt":""}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.name))])]),_vm._l((item.children),function(option,i){return _c('el-menu-item',{key:i,attrs:{"index":option.pagePath},on:{"click":function($event){return _vm.handleClick(option)}}},[_vm._v(_vm._s(option.name))])})],2)]:_c('el-menu-item',{key:key,attrs:{"index":item.pagePath},on:{"click":function($event){return _vm.oneClick(item)}}},[(item.icon)?_c('img',{staticClass:"bd-icon",attrs:{"src":item.icon,"alt":""}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.name))])])]})]],2)],1),(_vm.loginOut)?_c('section',{staticClass:"loginout"},[_c('i',{staticClass:"el-icon-setting",on:{"click":_vm.iconClick}}),_vm._t("loginout")],2):_vm._e()]):_vm._e(),_c('section',{staticClass:"content",style:({ top: _vm.top ? '3.75rem' : '0' })},[(_vm.left)?_c('section',{staticClass:"aside"},[(!_vm.topMenu && _vm.show)?[_c('el-menu',{staticClass:"el-menu-demo",attrs:{"default-active":_vm.root,"mode":"vertical","background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":"","unique-opened":true}},[_c('menu-list',{attrs:{"navMenus":_vm.mainMenu}})],1)]:[_c('el-menu',{staticClass:"left-menu",attrs:{"default-active":_vm.root,"background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":""}},[_vm._l((_vm.leftMenus.children),function(item,key){return [(item.children.length > 0)?[_c('el-submenu',{key:key,attrs:{"index":key + ''}},[_c('img',{attrs:{"src":item.icon,"alt":""}}),_c('template',{slot:"title"},[_c('span',[_vm._v(_vm._s(item.name))])]),_vm._l((item.children),function(option,i){return _c('el-menu-item',{key:i,attrs:{"index":option.index},on:{"click":function($event){return _vm.handleSelect(option, i)}}},[_vm._v(_vm._s(option.name))])})],2)]:_c('el-menu-item',{key:key,attrs:{"index":item.index},on:{"click":function($event){return _vm.handleSelect(item, key)}}},[_vm._v(_vm._s(item.name))])]})],2)]],2):_vm._e(),_c('section',{staticClass:"main"},[(_vm.left)?_c('section',{staticClass:"mainPage"},[_c('span',{staticClass:"el-icon-arrow-left"}),_c('div',{staticClass:"main-head"},[_c('div',_vm._l((_vm.tags),function(item,index){return _c('el-tag',{key:index,class:{'active':_vm.curMenuId == _vm.tag.id},nativeOn:{"click":function($event){return _vm.goThisPage(item)}}},[_c('span',[_vm._v(_vm._s(item.name))]),_vm._v(" "),_c('i',{staticClass:"iconfont el-icon-close",on:{"click":function($event){$event.stopPropagation();return _vm.handleClose(item, index)}}})])}),1)]),_c('span',{staticClass:"el-icon-arrow-right"})]):_vm._e(),_c('section',{staticClass:"table"},[_vm._t("main")],2),_c('section',{staticClass:"footer"},[_vm._v(_vm._s(_vm.footer))])])]),_c('el-drawer',{staticClass:"bd-drawer",attrs:{"title":"我是标题","visible":_vm.drawer,"with-header":false},on:{"update:visible":function($event){_vm.drawer=$event}}},[_c('div',{staticClass:"bd-drawer-main"},[_c('h3',[_vm._v("整体风格设置")]),_c('section',{staticClass:"bd-drawer-main-menu"},_vm._l((_vm.tipArr),function(imgMenu,index){return _c('div',{key:index,on:{"click":function($event){return _vm.menuClick(index)}}},[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":imgMenu.title,"placement":"top"}},[_c('img',{staticClass:"bd-img",attrs:{"src":imgMenu.src,"alt":""},on:{"click":function($event){return _vm.changeStyle(index)}}})]),_c('i',{class:[ | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c3c3599-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!./packages/template/menu/Menu.vue?vue&type=template&id=297be9e0& | ||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"menu",style:({ color: _vm.colorTxt })},[(_vm.top)?_c('section',{staticClass:"header",style:({ background: _vm.bgc })},[_c('section',{staticClass:"logo",style:({ width: _vm.logoClient }),on:{"click":_vm.handeleLogo}},[_c('img',{attrs:{"src":_vm.imgSrc}})]),_c('section',{staticClass:"headerMenu"},[_c('el-menu',{staticClass:"el-menu-demo",attrs:{"default-active":_vm.root,"mode":_vm.horizontalShow,"background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":"","unique-opened":true}},[(_vm.topMenu && !_vm.leftMenu && _vm.goShow)?[_c('menu-list',{attrs:{"navMenus":_vm.mainMenu}})]:[_vm._l((_vm.mainMenu),function(item,key){return [(item.children.length > 0)?[_c('el-submenu',{key:key,attrs:{"index":key + ''}},[_c('template',{slot:"title"},[(item.icon)?_c('img',{staticClass:"bd-icon",attrs:{"src":item.icon,"alt":""}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.name))])]),_vm._l((item.children),function(option,i){return _c('el-menu-item',{key:i,attrs:{"index":option.pagePath},on:{"click":function($event){return _vm.handleClick(option)}}},[_vm._v(_vm._s(option.name))])})],2)]:_c('el-menu-item',{key:key,attrs:{"index":item.pagePath},on:{"click":function($event){return _vm.oneClick(item)}}},[(item.icon)?_c('img',{staticClass:"bd-icon",attrs:{"src":item.icon,"alt":""}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.name))])])]})]],2)],1),(_vm.loginOut)?_c('section',{staticClass:"loginout"},[_c('i',{staticClass:"el-icon-setting",on:{"click":_vm.iconClick}}),_vm._t("loginout")],2):_vm._e()]):_vm._e(),_c('section',{staticClass:"content",style:({ top: _vm.top ? '3.75rem' : '0' })},[(_vm.left)?_c('section',{staticClass:"aside"},[(!_vm.topMenu && _vm.show)?[_c('el-menu',{staticClass:"el-menu-demo",attrs:{"default-active":_vm.root,"mode":"vertical","background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":"","unique-opened":true}},[_c('menu-list',{attrs:{"navMenus":_vm.mainMenu}})],1)]:[_c('el-menu',{staticClass:"left-menu",attrs:{"default-active":_vm.root,"background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":""}},[_vm._l((_vm.leftMenus.children),function(item,key){return [(item.children.length > 0)?[_c('el-submenu',{key:key,attrs:{"index":key + ''}},[_c('img',{attrs:{"src":item.icon,"alt":""}}),_c('template',{slot:"title"},[_c('span',[_vm._v(_vm._s(item.name))])]),_vm._l((item.children),function(option,i){return _c('el-menu-item',{key:i,attrs:{"index":option.pagePath},on:{"click":function($event){return _vm.handleSelect(option, i)}}},[_vm._v(_vm._s(option.name))])})],2)]:_c('el-menu-item',{key:key,attrs:{"index":item.pagePath},on:{"click":function($event){return _vm.handleSelect(item, key)}}},[_vm._v(_vm._s(item.name))])]})],2)]],2):_vm._e(),_c('section',{staticClass:"main"},[(_vm.left)?_c('section',{staticClass:"mainPage"},[_c('span',{staticClass:"el-icon-arrow-left"}),_c('div',{staticClass:"main-head"},[_c('div',_vm._l((_vm.tags),function(item,index){return _c('el-tag',{key:index,class:{'active':_vm.curMenuId == _vm.tag.id},nativeOn:{"click":function($event){return _vm.goThisPage(item)}}},[_c('span',[_vm._v(_vm._s(item.name))]),_vm._v(" "),_c('i',{staticClass:"iconfont el-icon-close",on:{"click":function($event){$event.stopPropagation();return _vm.handleClose(item, index)}}})])}),1)]),_c('span',{staticClass:"el-icon-arrow-right"})]):_vm._e(),_c('section',{staticClass:"table"},[_vm._t("main")],2),_c('section',{staticClass:"footer"},[_vm._v(_vm._s(_vm.footer))])])]),_c('el-drawer',{staticClass:"bd-drawer",attrs:{"title":"我是标题","visible":_vm.drawer,"with-header":false},on:{"update:visible":function($event){_vm.drawer=$event}}},[_c('div',{staticClass:"bd-drawer-main"},[_c('h3',[_vm._v("整体风格设置")]),_c('section',{staticClass:"bd-drawer-main-menu"},_vm._l((_vm.tipArr),function(imgMenu,index){return _c('div',{key:index,on:{"click":function($event){return _vm.menuClick(index)}}},[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":imgMenu.title,"placement":"top"}},[_c('img',{staticClass:"bd-img",attrs:{"src":imgMenu.src,"alt":""},on:{"click":function($event){return _vm.changeStyle(index)}}})]),_c('i',{class:[ | ||
imgMenu.icon, | ||
@@ -285,3 +285,3 @@ index == 0 ? ("" + (imgMenu.dgIcon)) : ("" + (imgMenu.dgIconT)), | ||
// CONCATENATED MODULE: ./packages/template/menu/Menu.vue?vue&type=template&id=52e0adca& | ||
// CONCATENATED MODULE: ./packages/template/menu/Menu.vue?vue&type=template&id=297be9e0& | ||
@@ -684,2 +684,3 @@ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c3c3599-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!./packages/common/Menu.vue?vue&type=template&id=9de25c4c&scoped=true& | ||
// | ||
// | ||
@@ -686,0 +687,0 @@ |
@@ -282,4 +282,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c3c3599-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!./packages/template/menu/Menu.vue?vue&type=template&id=52e0adca& | ||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"menu",style:({ color: _vm.colorTxt })},[(_vm.top)?_c('section',{staticClass:"header",style:({ background: _vm.bgc })},[_c('section',{staticClass:"logo",style:({ width: _vm.logoClient }),on:{"click":_vm.handeleLogo}},[_c('img',{attrs:{"src":_vm.imgSrc}})]),_c('section',{staticClass:"headerMenu"},[_c('el-menu',{staticClass:"el-menu-demo",attrs:{"default-active":_vm.root,"mode":_vm.horizontalShow,"background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":"","unique-opened":true}},[(_vm.topMenu && !_vm.leftMenu && _vm.goShow)?[_c('menu-list',{attrs:{"navMenus":_vm.mainMenu}})]:[_vm._l((_vm.mainMenu),function(item,key){return [(item.children.length > 0)?[_c('el-submenu',{key:key,attrs:{"index":key + ''}},[_c('template',{slot:"title"},[(item.icon)?_c('img',{staticClass:"bd-icon",attrs:{"src":item.icon,"alt":""}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.name))])]),_vm._l((item.children),function(option,i){return _c('el-menu-item',{key:i,attrs:{"index":option.pagePath},on:{"click":function($event){return _vm.handleClick(option)}}},[_vm._v(_vm._s(option.name))])})],2)]:_c('el-menu-item',{key:key,attrs:{"index":item.pagePath},on:{"click":function($event){return _vm.oneClick(item)}}},[(item.icon)?_c('img',{staticClass:"bd-icon",attrs:{"src":item.icon,"alt":""}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.name))])])]})]],2)],1),(_vm.loginOut)?_c('section',{staticClass:"loginout"},[_c('i',{staticClass:"el-icon-setting",on:{"click":_vm.iconClick}}),_vm._t("loginout")],2):_vm._e()]):_vm._e(),_c('section',{staticClass:"content",style:({ top: _vm.top ? '3.75rem' : '0' })},[(_vm.left)?_c('section',{staticClass:"aside"},[(!_vm.topMenu && _vm.show)?[_c('el-menu',{staticClass:"el-menu-demo",attrs:{"default-active":_vm.root,"mode":"vertical","background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":"","unique-opened":true}},[_c('menu-list',{attrs:{"navMenus":_vm.mainMenu}})],1)]:[_c('el-menu',{staticClass:"left-menu",attrs:{"default-active":_vm.root,"background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":""}},[_vm._l((_vm.leftMenus.children),function(item,key){return [(item.children.length > 0)?[_c('el-submenu',{key:key,attrs:{"index":key + ''}},[_c('img',{attrs:{"src":item.icon,"alt":""}}),_c('template',{slot:"title"},[_c('span',[_vm._v(_vm._s(item.name))])]),_vm._l((item.children),function(option,i){return _c('el-menu-item',{key:i,attrs:{"index":option.index},on:{"click":function($event){return _vm.handleSelect(option, i)}}},[_vm._v(_vm._s(option.name))])})],2)]:_c('el-menu-item',{key:key,attrs:{"index":item.index},on:{"click":function($event){return _vm.handleSelect(item, key)}}},[_vm._v(_vm._s(item.name))])]})],2)]],2):_vm._e(),_c('section',{staticClass:"main"},[(_vm.left)?_c('section',{staticClass:"mainPage"},[_c('span',{staticClass:"el-icon-arrow-left"}),_c('div',{staticClass:"main-head"},[_c('div',_vm._l((_vm.tags),function(item,index){return _c('el-tag',{key:index,class:{'active':_vm.curMenuId == _vm.tag.id},nativeOn:{"click":function($event){return _vm.goThisPage(item)}}},[_c('span',[_vm._v(_vm._s(item.name))]),_vm._v(" "),_c('i',{staticClass:"iconfont el-icon-close",on:{"click":function($event){$event.stopPropagation();return _vm.handleClose(item, index)}}})])}),1)]),_c('span',{staticClass:"el-icon-arrow-right"})]):_vm._e(),_c('section',{staticClass:"table"},[_vm._t("main")],2),_c('section',{staticClass:"footer"},[_vm._v(_vm._s(_vm.footer))])])]),_c('el-drawer',{staticClass:"bd-drawer",attrs:{"title":"我是标题","visible":_vm.drawer,"with-header":false},on:{"update:visible":function($event){_vm.drawer=$event}}},[_c('div',{staticClass:"bd-drawer-main"},[_c('h3',[_vm._v("整体风格设置")]),_c('section',{staticClass:"bd-drawer-main-menu"},_vm._l((_vm.tipArr),function(imgMenu,index){return _c('div',{key:index,on:{"click":function($event){return _vm.menuClick(index)}}},[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":imgMenu.title,"placement":"top"}},[_c('img',{staticClass:"bd-img",attrs:{"src":imgMenu.src,"alt":""},on:{"click":function($event){return _vm.changeStyle(index)}}})]),_c('i',{class:[ | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c3c3599-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!./packages/template/menu/Menu.vue?vue&type=template&id=297be9e0& | ||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"menu",style:({ color: _vm.colorTxt })},[(_vm.top)?_c('section',{staticClass:"header",style:({ background: _vm.bgc })},[_c('section',{staticClass:"logo",style:({ width: _vm.logoClient }),on:{"click":_vm.handeleLogo}},[_c('img',{attrs:{"src":_vm.imgSrc}})]),_c('section',{staticClass:"headerMenu"},[_c('el-menu',{staticClass:"el-menu-demo",attrs:{"default-active":_vm.root,"mode":_vm.horizontalShow,"background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":"","unique-opened":true}},[(_vm.topMenu && !_vm.leftMenu && _vm.goShow)?[_c('menu-list',{attrs:{"navMenus":_vm.mainMenu}})]:[_vm._l((_vm.mainMenu),function(item,key){return [(item.children.length > 0)?[_c('el-submenu',{key:key,attrs:{"index":key + ''}},[_c('template',{slot:"title"},[(item.icon)?_c('img',{staticClass:"bd-icon",attrs:{"src":item.icon,"alt":""}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.name))])]),_vm._l((item.children),function(option,i){return _c('el-menu-item',{key:i,attrs:{"index":option.pagePath},on:{"click":function($event){return _vm.handleClick(option)}}},[_vm._v(_vm._s(option.name))])})],2)]:_c('el-menu-item',{key:key,attrs:{"index":item.pagePath},on:{"click":function($event){return _vm.oneClick(item)}}},[(item.icon)?_c('img',{staticClass:"bd-icon",attrs:{"src":item.icon,"alt":""}}):_vm._e(),_c('span',[_vm._v(_vm._s(item.name))])])]})]],2)],1),(_vm.loginOut)?_c('section',{staticClass:"loginout"},[_c('i',{staticClass:"el-icon-setting",on:{"click":_vm.iconClick}}),_vm._t("loginout")],2):_vm._e()]):_vm._e(),_c('section',{staticClass:"content",style:({ top: _vm.top ? '3.75rem' : '0' })},[(_vm.left)?_c('section',{staticClass:"aside"},[(!_vm.topMenu && _vm.show)?[_c('el-menu',{staticClass:"el-menu-demo",attrs:{"default-active":_vm.root,"mode":"vertical","background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":"","unique-opened":true}},[_c('menu-list',{attrs:{"navMenus":_vm.mainMenu}})],1)]:[_c('el-menu',{staticClass:"left-menu",attrs:{"default-active":_vm.root,"background-color":_vm.bgc || '#409EFF',"text-color":"#fff","active-text-color":"#ffd04b","router":""}},[_vm._l((_vm.leftMenus.children),function(item,key){return [(item.children.length > 0)?[_c('el-submenu',{key:key,attrs:{"index":key + ''}},[_c('img',{attrs:{"src":item.icon,"alt":""}}),_c('template',{slot:"title"},[_c('span',[_vm._v(_vm._s(item.name))])]),_vm._l((item.children),function(option,i){return _c('el-menu-item',{key:i,attrs:{"index":option.pagePath},on:{"click":function($event){return _vm.handleSelect(option, i)}}},[_vm._v(_vm._s(option.name))])})],2)]:_c('el-menu-item',{key:key,attrs:{"index":item.pagePath},on:{"click":function($event){return _vm.handleSelect(item, key)}}},[_vm._v(_vm._s(item.name))])]})],2)]],2):_vm._e(),_c('section',{staticClass:"main"},[(_vm.left)?_c('section',{staticClass:"mainPage"},[_c('span',{staticClass:"el-icon-arrow-left"}),_c('div',{staticClass:"main-head"},[_c('div',_vm._l((_vm.tags),function(item,index){return _c('el-tag',{key:index,class:{'active':_vm.curMenuId == _vm.tag.id},nativeOn:{"click":function($event){return _vm.goThisPage(item)}}},[_c('span',[_vm._v(_vm._s(item.name))]),_vm._v(" "),_c('i',{staticClass:"iconfont el-icon-close",on:{"click":function($event){$event.stopPropagation();return _vm.handleClose(item, index)}}})])}),1)]),_c('span',{staticClass:"el-icon-arrow-right"})]):_vm._e(),_c('section',{staticClass:"table"},[_vm._t("main")],2),_c('section',{staticClass:"footer"},[_vm._v(_vm._s(_vm.footer))])])]),_c('el-drawer',{staticClass:"bd-drawer",attrs:{"title":"我是标题","visible":_vm.drawer,"with-header":false},on:{"update:visible":function($event){_vm.drawer=$event}}},[_c('div',{staticClass:"bd-drawer-main"},[_c('h3',[_vm._v("整体风格设置")]),_c('section',{staticClass:"bd-drawer-main-menu"},_vm._l((_vm.tipArr),function(imgMenu,index){return _c('div',{key:index,on:{"click":function($event){return _vm.menuClick(index)}}},[_c('el-tooltip',{staticClass:"item",attrs:{"effect":"dark","content":imgMenu.title,"placement":"top"}},[_c('img',{staticClass:"bd-img",attrs:{"src":imgMenu.src,"alt":""},on:{"click":function($event){return _vm.changeStyle(index)}}})]),_c('i',{class:[ | ||
imgMenu.icon, | ||
@@ -294,3 +294,3 @@ index == 0 ? ("" + (imgMenu.dgIcon)) : ("" + (imgMenu.dgIconT)), | ||
// CONCATENATED MODULE: ./packages/template/menu/Menu.vue?vue&type=template&id=52e0adca& | ||
// CONCATENATED MODULE: ./packages/template/menu/Menu.vue?vue&type=template&id=297be9e0& | ||
@@ -693,2 +693,3 @@ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0c3c3599-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!./packages/common/Menu.vue?vue&type=template&id=9de25c4c&scoped=true& | ||
// | ||
// | ||
@@ -695,0 +696,0 @@ |
@@ -1,1 +0,1 @@ | ||
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["bd-menus-lib"]=t():e["bd-menus-lib"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"0fae":function(e,t,n){},2659:function(e,t,n){},8085:function(e,t,n){"use strict";n("c0fd")},8875:function(e,t,n){var r,i,o;(function(n,s){i=[],r=s,o="function"===typeof r?r.apply(t,i):r,void 0===o||(e.exports=o)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(h){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,c=o.exec(h.stack)||s.exec(h.stack),a=c&&c[1]||!1,l=c&&c[2]||!1,u=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");a===u&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=n.replace(r,"$1").trim());for(var f=0;f<d.length;f++){if("interactive"===d[f].readyState)return d[f];if(d[f].src===a)return d[f];if(a===u&&d[f].innerHTML&&d[f].innerHTML.trim()===i)return d[f]}return null}}return e}))},"88c1":function(e,t,n){},"8af4":function(e,t,n){"use strict";n("88c1")},afd2:function(e,t,n){"use strict";n("2659")},c0fd:function(e,t,n){},fb15:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Menu",(function(){return _})),"undefined"!==typeof window){var r=window.document.currentScript,i=n("8875");r=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}n("0fae");var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"menu",style:{color:e.colorTxt}},[e.top?n("section",{staticClass:"header",style:{background:e.bgc}},[n("section",{staticClass:"logo",style:{width:e.logoClient},on:{click:e.handeleLogo}},[n("img",{attrs:{src:e.imgSrc}})]),n("section",{staticClass:"headerMenu"},[n("el-menu",{staticClass:"el-menu-demo",attrs:{"default-active":e.root,mode:e.horizontalShow,"background-color":e.bgc||"#409EFF","text-color":"#fff","active-text-color":"#ffd04b",router:"","unique-opened":!0}},[e.topMenu&&!e.leftMenu&&e.goShow?[n("menu-list",{attrs:{navMenus:e.mainMenu}})]:[e._l(e.mainMenu,(function(t,r){return[t.children.length>0?[n("el-submenu",{key:r,attrs:{index:r+""}},[n("template",{slot:"title"},[t.icon?n("img",{staticClass:"bd-icon",attrs:{src:t.icon,alt:""}}):e._e(),n("span",[e._v(e._s(t.name))])]),e._l(t.children,(function(t,r){return n("el-menu-item",{key:r,attrs:{index:t.pagePath},on:{click:function(n){return e.handleClick(t)}}},[e._v(e._s(t.name))])}))],2)]:n("el-menu-item",{key:r,attrs:{index:t.pagePath},on:{click:function(n){return e.oneClick(t)}}},[t.icon?n("img",{staticClass:"bd-icon",attrs:{src:t.icon,alt:""}}):e._e(),n("span",[e._v(e._s(t.name))])])]}))]],2)],1),e.loginOut?n("section",{staticClass:"loginout"},[n("i",{staticClass:"el-icon-setting",on:{click:e.iconClick}}),e._t("loginout")],2):e._e()]):e._e(),n("section",{staticClass:"content",style:{top:e.top?"3.75rem":"0"}},[e.left?n("section",{staticClass:"aside"},[!e.topMenu&&e.show?[n("el-menu",{staticClass:"el-menu-demo",attrs:{"default-active":e.root,mode:"vertical","background-color":e.bgc||"#409EFF","text-color":"#fff","active-text-color":"#ffd04b",router:"","unique-opened":!0}},[n("menu-list",{attrs:{navMenus:e.mainMenu}})],1)]:[n("el-menu",{staticClass:"left-menu",attrs:{"default-active":e.root,"background-color":e.bgc||"#409EFF","text-color":"#fff","active-text-color":"#ffd04b",router:""}},[e._l(e.leftMenus.children,(function(t,r){return[t.children.length>0?[n("el-submenu",{key:r,attrs:{index:r+""}},[n("img",{attrs:{src:t.icon,alt:""}}),n("template",{slot:"title"},[n("span",[e._v(e._s(t.name))])]),e._l(t.children,(function(t,r){return n("el-menu-item",{key:r,attrs:{index:t.index},on:{click:function(n){return e.handleSelect(t,r)}}},[e._v(e._s(t.name))])}))],2)]:n("el-menu-item",{key:r,attrs:{index:t.index},on:{click:function(n){return e.handleSelect(t,r)}}},[e._v(e._s(t.name))])]}))],2)]],2):e._e(),n("section",{staticClass:"main"},[e.left?n("section",{staticClass:"mainPage"},[n("span",{staticClass:"el-icon-arrow-left"}),n("div",{staticClass:"main-head"},[n("div",e._l(e.tags,(function(t,r){return n("el-tag",{key:r,class:{active:e.curMenuId==e.tag.id},nativeOn:{click:function(n){return e.goThisPage(t)}}},[n("span",[e._v(e._s(t.name))]),e._v(" "),n("i",{staticClass:"iconfont el-icon-close",on:{click:function(n){return n.stopPropagation(),e.handleClose(t,r)}}})])})),1)]),n("span",{staticClass:"el-icon-arrow-right"})]):e._e(),n("section",{staticClass:"table"},[e._t("main")],2),n("section",{staticClass:"footer"},[e._v(e._s(e.footer))])])]),n("el-drawer",{staticClass:"bd-drawer",attrs:{title:"我是标题",visible:e.drawer,"with-header":!1},on:{"update:visible":function(t){e.drawer=t}}},[n("div",{staticClass:"bd-drawer-main"},[n("h3",[e._v("整体风格设置")]),n("section",{staticClass:"bd-drawer-main-menu"},e._l(e.tipArr,(function(t,r){return n("div",{key:r,on:{click:function(t){return e.menuClick(r)}}},[n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.title,placement:"top"}},[n("img",{staticClass:"bd-img",attrs:{src:t.src,alt:""},on:{click:function(t){return e.changeStyle(r)}}})]),n("i",{class:[t.icon,0==r?""+t.dgIcon:""+t.dgIconT,e.current==r?"active":""]})],1)})),0),n("h4",[e._v("主颜色")]),n("section",[n("el-color-picker",{attrs:{"show-alpha":"",predefine:e.predefineColors},on:{change:e.handleColor},model:{value:e.color,callback:function(t){e.color=t},expression:"color"}})],1)]),n("div",{staticClass:"bd-drawer-color"},[n("h3",[e._v("导航模式")]),n("section",{staticClass:"bd-drawer-main-menu"},e._l(e.tipArr,(function(t,r){return n("div",{key:r,on:{click:function(t){return e.menuClicks(r)}}},[n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.title,placement:"top"}},[n("img",{staticClass:"bd-img",attrs:{src:t.src,alt:""},on:{click:function(t){return e.changeMenu(r)}}})]),n("i",{class:[t.icon,0==r?""+t.dgIcon:""+t.dgIconT,e.currents==r?"active":""]})],1)})),0)]),n("div",{staticClass:"bd-drawer-other"},[n("h3",[e._v("其他设置")])])])],1)},c=[],a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"navMenu"},e._l(e.navMenus,(function(t,r){return n("label",{key:r},[0==t.children.length?n("el-menu-item",{attrs:{index:t.pagePath,route:t.pagePath}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(t.name))])]):e._e(),t.children.length>0?n("el-submenu",{key:t.index,attrs:{index:t.id+""}},[n("template",{slot:"title"},[n("span",[e._v(" "+e._s(t.name))])]),n("nav-menu",{attrs:{navMenus:t.children}})],2):e._e()],1)})),0)},l=[],u={name:"navMenu",props:{navMenus:{type:Array,default:[]}},created(){}},d=u;n("8085");function f(e,t,n,r,i,o,s,c){var a,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),s?(a=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=a):i&&(a=c?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),a)if(l.functional){l._injectStyles=a;var u=l.render;l.render=function(e,t){return a.call(t),u(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,a):[a]}return{exports:e,options:l}}var h=f(d,a,l,!1,null,"9de25c4c",null),p=h.exports,g={name:"bd-menu",props:{topMenu:{type:Boolean,default:!0,required:!1},leftMenu:{type:Boolean,default:!0,required:!1},goShow:{type:Boolean,default:!0,required:!1},logoClient:{type:String,default:"200px",required:!1},colorText:{type:String,default:"yellow",required:!1},loginOut:{type:Boolean,default:!0,required:!1},mainMenu:{type:Array,default:function(){return[]},required:!1},curPath:{type:String,defalut:"",required:!1},bgcolor:{type:String,defalut:"",required:!1},imgSrc:{type:String},footer:{type:String,default:"脚部"}},components:{MenuList:p},data(){return{leftMenus:JSON.parse(sessionStorage.getItem("leftMenu"))||[],horizontalShow:"horizontal",drawer:!1,color:"#409EFF",predefineColors:["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgba(255, 69, 0, 0.68)","rgb(255, 120, 0)","hsv(51, 100, 98)","hsva(120, 40, 94, 0.5)","hsl(181, 100%, 37%)","hsla(209, 100%, 56%, 0.73)","#c7158577"],tipArr:[{src:"https://gw.alipayobjects.com/zos/rmsportal/LCkqqYNmvBEbokSDscrm.svg",title:"暗黑菜单风格",icon:"el-icon-check",dgIcon:"dgIcon",dgIconT:"dgIconT"},{src:"https://gw.alipayobjects.com/zos/rmsportal/jpRkZQMyYRryryPNtyIC.svg",title:"亮色菜单风格",icon:"el-icon-check",dgIcon:"dgIcon",dgIconT:"dgIconT"}],dgIcon:!1,current:0,currents:0,active:"active",colorTxt:this.colorText,bgc:this.bgcolor,top:this.topMenu,left:"",show:"",menu:"",curMenuId:"",tags:[],tag:!1,root:""}},watch:{$route:{handler:function(e,t){let n=JSON.parse(sessionStorage.getItem("leftMenu"))||[];e.path!=t.path&&(this.leftMenus=n,"/home"==e.path?this.root="":this.root=e.path)}},leftMenu(e,t){this.left=e},goShow(e,t){this.show=e},deep:!0},created(){JSON.parse(sessionStorage.getItem("tags"))&&(this.tags=JSON.parse(sessionStorage.getItem("tags")),console.log(this.tags)),this.leftMenus.children&&this.leftMenus.children.length>0?this.left=!0:this.left=!1},mounted(){},methods:{handleClick(e){e.children.length>0?this.tags=[e.children[0]]:this.tags=[],sessionStorage.setItem("leftMenu",JSON.stringify(e)),this.root="",this.$emit("pageClick",e)},oneClick(e){this.$emit("oneClick",!1),sessionStorage.removeItem("leftMenu"),e.children.length||(this.left=!1)},handeleLogo(){console.log(1),this.$emit("goBack",""),sessionStorage.removeItem("leftMenu"),this.left=!1,this.show=!1},iconClick(){this.drawer=!this.drawer},menuClick(e){this.current=e},menuClicks(e){this.currents=e},handleColor(e){this.colorTxt=e},changeStyle(e){0==e?this.bgc="#409EFF":1==e&&(this.bgc="#ff8c00")},changeMenu(e){0==e||1==e&&(this.top=!1)},goThisPage(e){this.$route.path!==e.index&&this.$router.push({path:e.index})},removeAaary(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r]==t)return 0==r?(e.shift(),e):r==n-1?(e.pop(),e):(e.splice(r,1),e)},handleClose(e,t){if(1!=this.tags.length){let n=this.tags;this.removeAaary(n,e),console.log(t),0==t&&this.$router.push({path:n[t].index}),0!=t&&n.length-1&&this.$router({path:n[t].index}),t==n.length-1&&0!=t&&this.$router.push({path:n[n.length-1].index}),1==n.length&&this.$router.push({path:n[0].index})}else this.$message({message:"至少保留一个页面哦",showClose:!0,center:!0,type:"warning"})},handleSelect(e,t){this.$emit("leftMenuClick",e),this.$router.push({path:e.pagePath}),this.tags.length>50?this.$message({message:"您点击的菜单太多啦,请关闭部分标签再点击!(最多不超过50个)",showClose:!0,center:!0,type:"warning"}):-1==JSON.stringify(this.tags).indexOf(JSON.stringify(e))&&(this.tags.push(e),sessionStorage.setItem("tags",JSON.stringify(this.tags)))}}},m=g,v=(n("8af4"),n("afd2"),f(m,s,c,!1,null,null,null)),y=v.exports;y.install=function(e){e.component(y.name,y)};var _=y;const b=[_],C=function(e){C.installed||b.forEach(t=>{e.component("bd-menu",t)})};"undefined"!==typeof window&&window.Vue&&C(window.Vue);var S={install:C};t["default"]=S}})})); | ||
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["bd-menus-lib"]=t():e["bd-menus-lib"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"0fae":function(e,t,n){},2659:function(e,t,n){},8085:function(e,t,n){"use strict";n("c0fd")},8875:function(e,t,n){var r,i,o;(function(n,s){i=[],r=s,o="function"===typeof r?r.apply(t,i):r,void 0===o||(e.exports=o)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(h){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,a=o.exec(h.stack)||s.exec(h.stack),c=a&&a[1]||!1,l=a&&a[2]||!1,u=document.location.href.replace(document.location.hash,""),d=document.getElementsByTagName("script");c===u&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=n.replace(r,"$1").trim());for(var f=0;f<d.length;f++){if("interactive"===d[f].readyState)return d[f];if(d[f].src===c)return d[f];if(c===u&&d[f].innerHTML&&d[f].innerHTML.trim()===i)return d[f]}return null}}return e}))},"88c1":function(e,t,n){},"8af4":function(e,t,n){"use strict";n("88c1")},afd2:function(e,t,n){"use strict";n("2659")},c0fd:function(e,t,n){},fb15:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Menu",(function(){return _})),"undefined"!==typeof window){var r=window.document.currentScript,i=n("8875");r=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}n("0fae");var s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"menu",style:{color:e.colorTxt}},[e.top?n("section",{staticClass:"header",style:{background:e.bgc}},[n("section",{staticClass:"logo",style:{width:e.logoClient},on:{click:e.handeleLogo}},[n("img",{attrs:{src:e.imgSrc}})]),n("section",{staticClass:"headerMenu"},[n("el-menu",{staticClass:"el-menu-demo",attrs:{"default-active":e.root,mode:e.horizontalShow,"background-color":e.bgc||"#409EFF","text-color":"#fff","active-text-color":"#ffd04b",router:"","unique-opened":!0}},[e.topMenu&&!e.leftMenu&&e.goShow?[n("menu-list",{attrs:{navMenus:e.mainMenu}})]:[e._l(e.mainMenu,(function(t,r){return[t.children.length>0?[n("el-submenu",{key:r,attrs:{index:r+""}},[n("template",{slot:"title"},[t.icon?n("img",{staticClass:"bd-icon",attrs:{src:t.icon,alt:""}}):e._e(),n("span",[e._v(e._s(t.name))])]),e._l(t.children,(function(t,r){return n("el-menu-item",{key:r,attrs:{index:t.pagePath},on:{click:function(n){return e.handleClick(t)}}},[e._v(e._s(t.name))])}))],2)]:n("el-menu-item",{key:r,attrs:{index:t.pagePath},on:{click:function(n){return e.oneClick(t)}}},[t.icon?n("img",{staticClass:"bd-icon",attrs:{src:t.icon,alt:""}}):e._e(),n("span",[e._v(e._s(t.name))])])]}))]],2)],1),e.loginOut?n("section",{staticClass:"loginout"},[n("i",{staticClass:"el-icon-setting",on:{click:e.iconClick}}),e._t("loginout")],2):e._e()]):e._e(),n("section",{staticClass:"content",style:{top:e.top?"3.75rem":"0"}},[e.left?n("section",{staticClass:"aside"},[!e.topMenu&&e.show?[n("el-menu",{staticClass:"el-menu-demo",attrs:{"default-active":e.root,mode:"vertical","background-color":e.bgc||"#409EFF","text-color":"#fff","active-text-color":"#ffd04b",router:"","unique-opened":!0}},[n("menu-list",{attrs:{navMenus:e.mainMenu}})],1)]:[n("el-menu",{staticClass:"left-menu",attrs:{"default-active":e.root,"background-color":e.bgc||"#409EFF","text-color":"#fff","active-text-color":"#ffd04b",router:""}},[e._l(e.leftMenus.children,(function(t,r){return[t.children.length>0?[n("el-submenu",{key:r,attrs:{index:r+""}},[n("img",{attrs:{src:t.icon,alt:""}}),n("template",{slot:"title"},[n("span",[e._v(e._s(t.name))])]),e._l(t.children,(function(t,r){return n("el-menu-item",{key:r,attrs:{index:t.pagePath},on:{click:function(n){return e.handleSelect(t,r)}}},[e._v(e._s(t.name))])}))],2)]:n("el-menu-item",{key:r,attrs:{index:t.pagePath},on:{click:function(n){return e.handleSelect(t,r)}}},[e._v(e._s(t.name))])]}))],2)]],2):e._e(),n("section",{staticClass:"main"},[e.left?n("section",{staticClass:"mainPage"},[n("span",{staticClass:"el-icon-arrow-left"}),n("div",{staticClass:"main-head"},[n("div",e._l(e.tags,(function(t,r){return n("el-tag",{key:r,class:{active:e.curMenuId==e.tag.id},nativeOn:{click:function(n){return e.goThisPage(t)}}},[n("span",[e._v(e._s(t.name))]),e._v(" "),n("i",{staticClass:"iconfont el-icon-close",on:{click:function(n){return n.stopPropagation(),e.handleClose(t,r)}}})])})),1)]),n("span",{staticClass:"el-icon-arrow-right"})]):e._e(),n("section",{staticClass:"table"},[e._t("main")],2),n("section",{staticClass:"footer"},[e._v(e._s(e.footer))])])]),n("el-drawer",{staticClass:"bd-drawer",attrs:{title:"我是标题",visible:e.drawer,"with-header":!1},on:{"update:visible":function(t){e.drawer=t}}},[n("div",{staticClass:"bd-drawer-main"},[n("h3",[e._v("整体风格设置")]),n("section",{staticClass:"bd-drawer-main-menu"},e._l(e.tipArr,(function(t,r){return n("div",{key:r,on:{click:function(t){return e.menuClick(r)}}},[n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.title,placement:"top"}},[n("img",{staticClass:"bd-img",attrs:{src:t.src,alt:""},on:{click:function(t){return e.changeStyle(r)}}})]),n("i",{class:[t.icon,0==r?""+t.dgIcon:""+t.dgIconT,e.current==r?"active":""]})],1)})),0),n("h4",[e._v("主颜色")]),n("section",[n("el-color-picker",{attrs:{"show-alpha":"",predefine:e.predefineColors},on:{change:e.handleColor},model:{value:e.color,callback:function(t){e.color=t},expression:"color"}})],1)]),n("div",{staticClass:"bd-drawer-color"},[n("h3",[e._v("导航模式")]),n("section",{staticClass:"bd-drawer-main-menu"},e._l(e.tipArr,(function(t,r){return n("div",{key:r,on:{click:function(t){return e.menuClicks(r)}}},[n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.title,placement:"top"}},[n("img",{staticClass:"bd-img",attrs:{src:t.src,alt:""},on:{click:function(t){return e.changeMenu(r)}}})]),n("i",{class:[t.icon,0==r?""+t.dgIcon:""+t.dgIconT,e.currents==r?"active":""]})],1)})),0)]),n("div",{staticClass:"bd-drawer-other"},[n("h3",[e._v("其他设置")])])])],1)},a=[],c=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"navMenu"},e._l(e.navMenus,(function(t,r){return n("label",{key:r},[0==t.children.length?n("el-menu-item",{attrs:{index:t.pagePath,route:t.pagePath}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(t.name))])]):e._e(),t.children.length>0?n("el-submenu",{key:t.index,attrs:{index:t.id+""}},[n("template",{slot:"title"},[n("span",[e._v(" "+e._s(t.name))])]),n("nav-menu",{attrs:{navMenus:t.children}})],2):e._e()],1)})),0)},l=[],u={name:"navMenu",props:{navMenus:{type:Array,default:[]}},created(){}},d=u;n("8085");function f(e,t,n,r,i,o,s,a){var c,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),s?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):i&&(c=a?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:l}}var h=f(d,c,l,!1,null,"9de25c4c",null),p=h.exports,g={name:"bd-menu",props:{topMenu:{type:Boolean,default:!0,required:!1},leftMenu:{type:Boolean,default:!0,required:!1},goShow:{type:Boolean,default:!0,required:!1},logoClient:{type:String,default:"200px",required:!1},colorText:{type:String,default:"yellow",required:!1},loginOut:{type:Boolean,default:!0,required:!1},mainMenu:{type:Array,default:function(){return[]},required:!1},curPath:{type:String,defalut:"",required:!1},bgcolor:{type:String,defalut:"",required:!1},imgSrc:{type:String},footer:{type:String,default:"脚部"}},components:{MenuList:p},data(){return{leftMenus:JSON.parse(sessionStorage.getItem("leftMenu"))||[],horizontalShow:"horizontal",drawer:!1,color:"#409EFF",predefineColors:["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgba(255, 69, 0, 0.68)","rgb(255, 120, 0)","hsv(51, 100, 98)","hsva(120, 40, 94, 0.5)","hsl(181, 100%, 37%)","hsla(209, 100%, 56%, 0.73)","#c7158577"],tipArr:[{src:"https://gw.alipayobjects.com/zos/rmsportal/LCkqqYNmvBEbokSDscrm.svg",title:"暗黑菜单风格",icon:"el-icon-check",dgIcon:"dgIcon",dgIconT:"dgIconT"},{src:"https://gw.alipayobjects.com/zos/rmsportal/jpRkZQMyYRryryPNtyIC.svg",title:"亮色菜单风格",icon:"el-icon-check",dgIcon:"dgIcon",dgIconT:"dgIconT"}],dgIcon:!1,current:0,currents:0,active:"active",colorTxt:this.colorText,bgc:this.bgcolor,top:this.topMenu,left:"",show:"",menu:"",curMenuId:"",tags:[],tag:!1,root:""}},watch:{$route:{handler:function(e,t){let n=JSON.parse(sessionStorage.getItem("leftMenu"))||[];e.path!=t.path&&(this.leftMenus=n,"/home"==e.path?this.root="":this.root=e.path)}},leftMenu(e,t){this.left=e},goShow(e,t){this.show=e},deep:!0},created(){JSON.parse(sessionStorage.getItem("tags"))&&(this.tags=JSON.parse(sessionStorage.getItem("tags")),console.log(this.tags)),this.leftMenus.children&&this.leftMenus.children.length>0?this.left=!0:this.left=!1},mounted(){},methods:{handleClick(e){e.children.length>0?this.tags=[e.children[0]]:this.tags=[],sessionStorage.setItem("leftMenu",JSON.stringify(e)),this.root="",this.$emit("pageClick",e)},oneClick(e){this.$emit("oneClick",!1),sessionStorage.removeItem("leftMenu"),e.children.length||(this.left=!1)},handeleLogo(){console.log(1),this.$emit("goBack",""),sessionStorage.removeItem("leftMenu"),this.left=!1,this.show=!1},iconClick(){this.drawer=!this.drawer},menuClick(e){this.current=e},menuClicks(e){this.currents=e},handleColor(e){this.colorTxt=e},changeStyle(e){0==e?this.bgc="#409EFF":1==e&&(this.bgc="#ff8c00")},changeMenu(e){0==e||1==e&&(this.top=!1)},goThisPage(e){this.$route.path!==e.index&&this.$router.push({path:e.index})},removeAaary(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r]==t)return 0==r?(e.shift(),e):r==n-1?(e.pop(),e):(e.splice(r,1),e)},handleClose(e,t){if(1!=this.tags.length){let n=this.tags;this.removeAaary(n,e),console.log(t),0==t&&this.$router.push({path:n[t].index}),0!=t&&n.length-1&&this.$router({path:n[t].index}),t==n.length-1&&0!=t&&this.$router.push({path:n[n.length-1].index}),1==n.length&&this.$router.push({path:n[0].index})}else this.$message({message:"至少保留一个页面哦",showClose:!0,center:!0,type:"warning"})},handleSelect(e,t){this.$emit("leftMenuClick",e),this.$router.push({path:e.pagePath}),this.tags.length>50?this.$message({message:"您点击的菜单太多啦,请关闭部分标签再点击!(最多不超过50个)",showClose:!0,center:!0,type:"warning"}):-1==JSON.stringify(this.tags).indexOf(JSON.stringify(e))&&(this.tags.push(e),sessionStorage.setItem("tags",JSON.stringify(this.tags)))}}},m=g,v=(n("8af4"),n("afd2"),f(m,s,a,!1,null,null,null)),y=v.exports;y.install=function(e){e.component(y.name,y)};var _=y;const b=[_],C=function(e){C.installed||b.forEach(t=>{e.component("bd-menu",t)})};"undefined"!==typeof window&&window.Vue&&C(window.Vue);var S={install:C};t["default"]=S}})})); |
{ | ||
"name": "bd-menus-lib", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "基本架构", |
Sorry, the diff of this file is not supported yet
410435
2025