shop_mer_admin/mer/js/chunk-a7caa632.5769ae72.js

1 line
6.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a7caa632"],{"1adb":function(t,e,s){"use strict";s("d1f2")},"5da5":function(t,e,s){"use strict";var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.clientWidth>1e3?s("el-aside",{staticClass:"layout-aside",class:t.setCollapseWidth},[t.setShowLogo&&t.menuList.length&&"columns"!==t.getThemeConfig.layout?s("Logo"):t._e(),t._v(" "),t.menuList.length&&"columns"==t.getThemeConfig.layout?s("div",{staticClass:"cat-name"},[t._v("\n "+t._s(t.adminTitle||t.catName)+"\n ")]):t._e(),t._v(" "),s("el-scrollbar",{ref:"layoutAsideRef",staticClass:"flex-auto"},[s("Vertical",{class:t.setCollapseWidth,attrs:{menuList:t.menuList}})],1)],1):s("el-drawer",{attrs:{visible:t.getThemeConfig.isCollapse,"with-header":!1,direction:"ltr",size:"180px"},on:{"update:visible":function(e){return t.$set(t.getThemeConfig,"isCollapse",e)}}},[s("el-aside",{staticClass:"layout-aside w100 h100"},[t.setShowLogo&&t.menuList.length?s("Logo"):t._e(),t._v(" "),s("el-scrollbar",{ref:"layoutAsideRef",staticClass:"flex-auto"},[s("Vertical",{attrs:{menuList:t.menuList}})],1)],1)],1)},n=[],o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("el-menu",{class:t.setColumnsAsideStyle,attrs:{router:"","background-color":"transparent","default-active":t.activePath||t.defaultActive,collapse:t.setIsCollapse,"unique-opened":t.getThemeConfig.isUniqueOpened,"collapse-transition":!0}},[t._l(t.menuList,(function(e){return[e.children&&e.children.length>0?s("el-submenu",{key:e.path,attrs:{index:e.path}},[s("template",{slot:"title"},[s("i",{staticClass:"ivu-icon",class:e.icon?"el-icon-"+e.icon:""}),t._v(" "),s("span",[t._v(t._s(e.title))])]),t._v(" "),s("SubItem",{attrs:{chil:e.children}})],2):[s("el-menu-item",{key:e.path,attrs:{index:e.path}},[s("i",{staticClass:"ivu-icon",class:e.icon?"el-icon-"+e.icon:""}),t._v(" "),s("template",{slot:"title"},[s("span",[t._v(t._s(e.title))])])],2)]]}))],2)],1)},a=[],l=s("5530"),u=s("7686"),r=s("2f62"),c={name:"navMenuVertical",components:{SubItem:u["a"]},props:{menuList:{type:Array,default:function(){return[]}}},data:function(){return{defaultActive:this.$route.path,onRoutes:""}},computed:Object(l["a"])(Object(l["a"])({},Object(r["d"])("menu",["activePath"])),{},{setColumnsAsideStyle:function(){return this.$store.state.themeConfig.themeConfig.columnsAsideStyle},getThemeConfig:function(){return this.$store.state.themeConfig.themeConfig},setIsCollapse:function(){return!(document.body.clientWidth<1e3)&&this.$store.state.themeConfig.themeConfig.isCollapse}}),watch:{$route:{handler:function(t){this.defaultActive=t.path;var e=document.body.clientWidth;e<1e3&&(this.$store.state.themeConfig.themeConfig.isCollapse=!1)},deep:!0}},created:function(){}},h=c,d=(s("fd9d"),s("2877")),f=Object(d["a"])(h,o,a,!1,null,"0cf9b618",null),m=f.exports,p=s("6376"),g={name:"layoutAside",components:{Vertical:m,Logo:p["a"]},data:function(){return{clientWidth:"",catName:""}},watch:{menuList:{handler:function(t,e){},immediate:!0}},computed:{adminTitle:function(){return this.$store.state.app.adminTitle||""},menuList:function(){return console.log(this.$store.state.user.childMenuList,"this.$store.state.user.childMenuList"),this.$store.state.user.childMenuList.length>0?this.$store.state.themeConfig.themeConfig.isCollapse=!1:this.$store.state.themeConfig.themeConfig.isCollapse=!0,this.$store.state.user.childMenuList},setCollapseWidth:function(){var t=this.$store.state.themeConfig.themeConfig,e=t.layout,s=t.isCollapse,i="";return("classic"===e||"columns"===e)&&(i="layout-el-aside-br-color"),"columns"===e?s?["layout-aside-width1",i]:["layout-aside-width-default",i]:s?["layout-aside-width64",i]:["layout-aside-width-default",i]},setShowLogo:function(){var t=this.$store.state.themeConfig.themeConfig,e=t.layout,s=t.isShowLogo;return s&&"defaults"===e||s&&"columns"===e},getThemeConfig:function(){return this.$store.state.themeConfig.themeConfig}},mounted:function(){},created:function(){var t=this;this.initMenuFixed(document.body.clientWidth),this.setFilterRoutes(),this.bus.$on("layoutMobileResize",(function(e){t.initMenuFixed(e.clientWidth)})),this.bus.$on("oneCatName",(function(e){t.catName=e})),this.bus.$on("updateElScrollBar",(function(){setTimeout((function(){t.$refs.layoutAsideRef.update()}),300)})),"columns"!==this.$store.state.themeConfig.themeConfig.layout&&this.bus.$on("routesListChange",(function(){t.setFilterRoutes()}))},beforeDestroy:function(){this.bus.$off("routesListChange")},methods:{getMenus:function(){this.$store.dispatch("user/getMenus")},setFilterRoutes:function(){if("columns"===this.$store.state.themeConfig.themeConfig.layout)return!1;this.$store.commit("user/childMenuList",this.filterRoutesFun(this.$store.state.user.menuList))},filterRoutesFun:function(t){var e=this;return t.filter((function(t){return t.path})).map((function(t){return t=Object.assign({},t),t.children&&(t.children=e.filterRoutesFun(t.children)),t}))},initMenuFixed:function(t){this.clientWidth=t,this.$emit("routesListChange")}},destroyed:function(){this.bus.$off("updateElScrollBar",(function(){}))}},C=g,b=(s("1adb"),Object(d["a"])(C,i,n,!1,null,"6d433aef",null));e["a"]=b.exports},"87f7":function(t,e,s){},d1f2:function(t,e,s){},d5ca:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-container",{staticClass:"layout-container"},[s("Asides"),t._v(" "),s("el-container",{staticClass:"flex-center layout-backtop"},[t.isFixedHeader?s("Headers"):t._e(),t._v(" "),s("el-scrollbar",{ref:"layoutDefaultsScrollbarRef"},[t.isFixedHeader?t._e():s("Headers"),t._v(" "),s("Mains")],1)],1),t._v(" "),s("el-backtop",{attrs:{target:".layout-backtop .el-scrollbar__wrap"}})],1)},n=[],o=s("5da5"),a=s("bb39"),l=s("3eeb"),u={name:"layoutDefaults",components:{Asides:o["a"],Headers:a["a"],Mains:l["default"]},data:function(){return{}},computed:{isFixedHeader:function(){return this.$store.state.themeConfig.themeConfig.isFixedHeader}},watch:{$route:{handler:function(){this.$refs.layoutDefaultsScrollbarRef.wrap.scrollTop=0},deep:!0}}},r=u,c=s("2877"),h=Object(c["a"])(r,i,n,!1,null,null,null);e["default"]=h.exports},fd9d:function(t,e,s){"use strict";s("87f7")}}]);