zhangxiaoxu123456
2022-04-18 89f1ca8bc589aaa6f4909ebef4493063b240a3d1
1
2
webpackJsonp([0],{CNiR:function(t,e){},MpTN:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=new(s("7+uW").a),n={data:function(){return{isColl:!1,fullscreen:!1,title:"EricGu178",barge:null}},computed:{},methods:{logout:function(){localStorage.removeItem("userinfo"),this.$router.push("/login")},collapseChage:function(){this.barge++,this.isColl=!this.isColl,i.$emit("isColl",this.isColl)},handleFullScreen:function(){var t=document.documentElement;this.fullscreen?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen(),this.fullscreen=!this.fullscreen}},mounted:function(){document.body.clientWidth<1500&&this.collapseChage()}},a={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"header"},[s("div",{staticClass:"collapse-btn",on:{click:t.collapseChage}},[t.isColl?s("a-icon",{attrs:{type:"menu-unfold"}}):t._e(),t._v(" "),t.isColl?t._e():s("a-icon",{attrs:{type:"menu-fold"}})],1),t._v(" "),s("div",{staticClass:"logo",class:{"content-collapse":t.isColl}},[t._v(t._s(t.title))]),t._v(" "),s("div",{staticClass:"header-right"},[s("div",{staticClass:"header-user-con"},[t.fullscreen?t._e():s("a-icon",{staticStyle:{cursor:"pointer"},attrs:{type:"fullscreen"},on:{click:t.handleFullScreen}}),t._v(" "),t.fullscreen?s("a-icon",{staticStyle:{cursor:"pointer"},attrs:{type:"fullscreen-exit"},on:{click:t.handleFullScreen}}):t._e(),t._v(" "),s("a-badge",{attrs:{count:t.barge}},[s("a-avatar",{staticClass:"user-avator",attrs:{shape:"square",src:"https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"}})],1),t._v(" "),s("a-dropdown",{staticClass:"user-name",attrs:{trigger:["click"]}},[s("span",{staticClass:"ant-dropdown-link",staticStyle:{"font-size":"16px",cursor:"pointer"}},[t._v("\n                      admin"),s("a-icon",{attrs:{type:"down"}})],1),t._v(" "),s("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[s("a-menu-item",[s("a",{attrs:{href:"javascript:;"},on:{click:t.logout}},[t._v("注销")])])],1)],1)],1)])])},staticRenderFns:[]};var l={data:function(){return{isColl:!1,openkeys:[],items:[{icon:"desktop",index:"/blog",title:"博客管理",subs:[{icon:"file-word",index:"index",title:"文章管理"},{icon:"message",index:"comments",title:"评论管理"},{icon:"tags",index:"label",title:"标签管理"}]},{icon:"wechat",index:"/wechat",title:"微信",subs:[{icon:"file-word",index:"auto_say",title:"自动回复"}]},{icon:"setting",index:"/system",title:"系统",subs:[{icon:"file-word",index:"menu",title:"菜单管理"}]}]}},methods:{titleClick:function(t){this.$router.push({path:""+t})},onOpenChange:function(t){return t[1]?(this.openkeys=[t[1]],!1):t[0]?(this.openkeys=[t[0]],!1):void(this.openkeys=[])}},computed:{onRoutes:function(){for(var t=this.$route.path.replace("/",""),e=0;e<this.items.length;e++)if(this.items[e].subs)for(var s=0;s<this.items[e].subs.length;s++)t==this.items[e].subs[s].index&&(this.openkeys=[this.items[e].index]);return this.$route.path.replace("/","")}},created:function(){var t=this;i.$on("isColl",function(e){t.isColl=e})}},o={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"sidebar"},[s("a-menu",{attrs:{theme:"dark",mode:"inline",inlineCollapsed:t.isColl,openKeys:t.openkeys,selectedKeys:[t.onRoutes]},on:{openChange:t.onOpenChange}},[t._l(t.items,function(e){return[e.subs?[s("a-sub-menu",{key:e.index},[s("span",{attrs:{slot:"title"},slot:"title"},[s("a-icon",{attrs:{type:e.icon}}),s("span",[t._v(t._s(e.title))])],1),t._v(" "),t._l(e.subs,function(e){return s("a-menu-item",{key:e.index,on:{click:function(s){return t.titleClick(e.index)}}},[s("a-icon",{attrs:{type:e.icon}}),t._v(t._s(e.title)+"\n                ")],1)})],2)]:[s("a-menu-item",{key:e.index,on:{click:function(s){return t.titleClick(e.index)}}},[s("a-icon",{attrs:{type:e.icon}}),s("span",[t._v(t._s(e.title))])],1)]]})],2)],1)},staticRenderFns:[]};var r={data:function(){return{tagsList:[]}},methods:{isActive:function(t){return t===this.$route.fullPath},closeTags:function(t){var e=this.tagsList.splice(t,1)[0],s=this.tagsList[t]?this.tagsList[t]:this.tagsList[t-1];s?e.path===this.$route.fullPath&&this.$router.push(s.path):this.$router.push("/")},setTags:function(t){this.tagsList.some(function(e){return e.path===t.fullPath})||(this.tagsList.length>=8&&this.tagsList.shift(),this.tagsList.push({title:t.meta.title,path:t.fullPath})),i.$emit("tags",this.tagsList)},handleMenuClick:function(t){for(var e=this,s=void 0,i=0;i<this.tagsList.length;i++)this.$route.path==this.tagsList[i].path&&(s=i);if(1==t.key)return this.closeTags(s);if(2==t.key){var n=this.tagsList.filter(function(t){return t.path===e.$route.fullPath});return this.tagsList=n,!1}3==t.key&&(this.tagsList=[],this.$router.push("/"))}},computed:{showTags:function(){return this.tagsList.length>0}},watch:{$route:function(t,e){this.setTags(t)}},created:function(){var t=this;this.setTags(this.$route),i.$on("close_current_tags",function(){for(var e=0,s=t.tagsList.length;e<s;e++){t.tagsList[e].path===t.$route.fullPath&&(e<s-1?t.$router.push(t.tagsList[e+1].path):e>0?t.$router.push(t.tagsList[e-1].path):t.$router.push("/"),t.tagsList.splice(e,1))}})}},c={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"tags"},[s("ul",t._l(t.tagsList,function(e,i){return s("li",{key:i,staticClass:"tags-li",class:{active:t.isActive(e.path)}},[s("router-link",{staticClass:"tags-li-title",attrs:{to:e.path}},[t._v("\n                "+t._s(e.title)+"\n            ")]),t._v(" "),s("span",{staticClass:"tags-li-icon",on:{click:function(e){return t.closeTags(i)}}},[s("a-icon",{attrs:{type:"close"}})],1)],1)}),0),t._v(" "),s("div",{staticClass:"tags-close-box"},[s("a-dropdown",[s("a-menu",{attrs:{slot:"overlay"},on:{click:t.handleMenuClick},slot:"overlay"},[s("a-menu-item",{key:"1"},[t._v("关闭当前标签页")]),t._v(" "),s("a-menu-item",{key:"2"},[t._v("关闭其他标签页")]),t._v(" "),s("a-menu-item",{key:"3"},[t._v("关闭全部标签页")])],1),t._v(" "),s("a-button",{staticStyle:{"margin-left":"8px"}},[t._v("\n                标签选项 "),s("a-icon",{attrs:{type:"down"}})],1)],1)],1)])},staticRenderFns:[]};var u={data:function(){return{tagsList:[],isColl:!1}},components:{vHead:s("VU/8")(n,a,!1,function(t){s("xzxC")},"data-v-89035262",null).exports,vSidebar:s("VU/8")(l,o,!1,function(t){s("CNiR")},"data-v-070c66f6",null).exports,vTags:s("VU/8")(r,c,!1,function(t){s("beIB")},null,null).exports},created:function(){var t=this,e=localStorage.getItem("userinfo");console.log(e),i.$on("isColl",function(e){t.isColl=e}),i.$on("tags",function(e){for(var s=[],i=0,n=e.length;i<n;i++)e[i].name&&s.push(e[i].name);t.tagsList=s})}},h={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"wrapper"},[e("vHead"),this._v(" "),e("vSidebar"),this._v(" "),e("div",{staticClass:"content-box",class:{"content-collapse":this.isColl}},[e("vTags"),this._v(" "),e("div",{staticClass:"content"},[e("transition",{attrs:{name:"move",mode:"out-in"}},[e("keep-alive",{attrs:{include:this.tagsList}},[e("router-view")],1)],1)],1)],1)],1)},staticRenderFns:[]},d=s("VU/8")(u,h,!1,null,null,null);e.default=d.exports},beIB:function(t,e){},xzxC:function(t,e){}});
//# sourceMappingURL=0.9178a582c162ffd76677.js.map