webpackJsonp([21],{H0Nb:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=n("Dd8w"),s=n.n(l),a=n("NYxO"),r=n("SQ6o"),i={data:function(){return{items:[],show:!1,langs:[{value:"zh-CN",label:"简体中文"},{value:"en",label:"English"}],lang:"",fullscreen:!1}},watch:{$route:function(){this.getBreadcrumb()}},created:function(){this.lang=localStorage.getItem("lang")||"zh-CN"},mounted:function(){this.getBreadcrumb()},computed:s()({},Object(a.b)(["settings"]),{showBreadCrumb:function(){return this.settings.showBreadCrumb},collapseMenu:function(){return this.settings.collapseMenu}}),methods:{getBreadcrumb:function(){this.show=!1;var e=this.$route.matched.filter(function(e){if(e.name)return!0}),t=e[0];t&&"Home"===t.name&&(e.splice(0,1),t=e[0]),t&&"首页"!==t.name&&(e=[{path:"/",name:"首页",fixed:!0,meta:{fixed:!0}}].concat(e)),e.length>=4&&e.splice(1,1),this.items=e,this.show=!0},toggleMenu:function(){this.$store.dispatch("updateSettings",{key:"collapseMenu",type:"toggle"})},switchLang:function(e){localStorage.setItem("lang",e),this.$store.dispatch("updateSettings",{key:"lang",value:e}),this.$i18n.locale=e},handleFullScreen:function(){var e=document.documentElement;this.fullscreen?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen(),this.fullscreen=!this.fullscreen},openSettings:function(){this.$store.dispatch("updateSettings",{key:"openSetting",value:!0})},logout:function(){var e=this;this.$confirm("确定要注销登录么?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){r.a.delToken(),e.$router.push("/login")})},handleCommand:function(e){switch(e){case"settings":this.openSettings();break;case"logout":this.logout()}}}},o={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"nav-bar"},[n("div",{staticClass:"nav-bar-left"},[n("button",{staticClass:"toggle-btn",on:{click:e.toggleMenu}},[n("i",{class:e.collapseMenu?"el-icon-s-unfold":"el-icon-s-fold"})]),e._v(" "),n("transition",{attrs:{name:"el-fade-in-linear"}},[e.showBreadCrumb?n("el-breadcrumb",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}],attrs:{separator:"/"}},e._l(e.items,function(t,l){return n("el-breadcrumb-item",{key:t.name},[0==l&&1!=e.items.length?n("a",{attrs:{href:t.path}},[e._v(e._s(t.name))]):n("span",[e._v(e._s(t.name))])])}),1):e._e()],1)],1),e._v(" "),n("div",{staticClass:"nav-bar-right"},[n("el-select",{attrs:{size:"small"},on:{change:e.switchLang},model:{value:e.lang,callback:function(t){e.lang=t},expression:"lang"}},e._l(e.langs,function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}),1),e._v(" "),n("ul",[n("li",[n("el-popover",{attrs:{title:e.$t("message.navBar.MESSAGE_TEXT"),width:"200",trigger:"hover",content:"开启web小工具"}},[n("el-badge",{attrs:{slot:"reference",value:5},slot:"reference"},[n("i",{staticClass:"el-icon-message-solid"})])],1)],1),e._v(" "),n("li",[n("el-popover",{attrs:{title:e.$t("message.navBar.NOTE_TEXT"),width:"200",trigger:"hover",content:"小工具开始搭建！"}},[n("i",{staticClass:"el-icon-s-order",attrs:{slot:"reference"},slot:"reference"})])],1),e._v(" "),n("li",[n("el-popover",{attrs:{title:e.$t("message.navBar.SHARE_TEXT"),width:"330",trigger:"hover"}},[n("div",[e._v("\n              码云地址:\n              "),n("br"),e._v(" "),n("el-link",{attrs:{type:"primary",underline:!1,href:"https://gitee.com/xwintop/xVueTool",target:"_blank"}},[e._v("https://gitee.com/xwintop/xVueTool")])],1),e._v(" "),n("i",{staticClass:"el-icon-share",attrs:{slot:"reference"},slot:"reference"})])],1),e._v(" "),n("li",{on:{click:e.handleFullScreen}},[n("el-tooltip",{attrs:{effect:"dark",content:e.fullscreen?e.$t("message.navBar.CANCEL_FULL_SCREEN_TEXT"):e.$t("message.navBar.FULL_SCREEN_TEXT"),placement:"bottom"}},[n("i",{staticClass:"dd full-screen",class:e.fullscreen?"cancel-full-screen":"full-screen"})])],1),e._v(" "),n("li",{on:{click:e.openSettings}},[n("el-tooltip",{attrs:{effect:"dark",content:e.$t("message.navBar.SETTINGS_TEXT"),placement:"bottom"}},[n("i",{staticClass:"el-icon-s-tools"})])],1)])],1)])},staticRenderFns:[]};var c=n("VU/8")(i,o,!1,function(e){n("dtAA")},"data-v-7cf24a2e",null);t.default=c.exports},dtAA:function(e,t){}});