| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{551:function(e,t,r){},566:function(e,t,r){"use strict";r(551)},647:function(e,t,r){"use strict";r.r(t);r(23),r(8),r(93),r(56),r(319);function n(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],i=0;i<e.length;){var r=e[i];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:i,value:e[i++]});else{var n=1,pattern="";if("?"===e[f=i+1])throw new TypeError('Pattern cannot start with "?" at '+f);for(;f<e.length;)if("\\"!==e[f]){if(")"===e[f]){if(0==--n){f++;break}}else if("("===e[f]&&(n++,"?"!==e[f+1]))throw new TypeError("Capturing groups are not allowed at "+f);pattern+=e[f++]}else pattern+=e[f++]+e[f++];if(n)throw new TypeError("Unbalanced pattern at "+i);if(!pattern)throw new TypeError("Missing pattern at "+i);t.push({type:"PATTERN",index:i,value:pattern}),i=f}else{for(var o="",f=i+1;f<e.length;){var code=e.charCodeAt(f);if(!(code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122||95===code))break;o+=e[f++]}if(!o)throw new TypeError("Missing parameter name at "+i);t.push({type:"NAME",index:i,value:o}),i=f}else t.push({type:"CLOSE",index:i,value:e[i++]});else t.push({type:"OPEN",index:i,value:e[i++]});else t.push({type:"ESCAPED_CHAR",index:i++,value:e[i++]});else t.push({type:"MODIFIER",index:i,value:e[i++]})}return t.push({type:"END",index:i,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,l="[^"+f(t.delimiter||"/#?")+"]+?",c=[],h=0,i=0,path="",d=function(e){if(i<r.length&&r[i].type===e)return r[i++].value},m=function(e){var t=d(e);if(void 0!==t)return t;var n=r[i],o=n.type,f=n.index;throw new TypeError("Unexpected "+o+" at "+f+", expected "+e)},v=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t};i<r.length;){var E=d("CHAR"),w=d("NAME"),pattern=d("PATTERN");if(w||pattern){var x=E||"";-1===o.indexOf(x)&&(path+=x,x=""),path&&(c.push(path),path=""),c.push({name:w||h++,prefix:x,suffix:"",pattern:pattern||l,modifier:d("MODIFIER")||""})}else{var y=E||d("ESCAPED_CHAR");if(y)path+=y;else if(path&&(c.push(path),path=""),d("OPEN")){x=v();var C=d("NAME")||"",A=d("PATTERN")||"",T=v();m("CLOSE"),c.push({name:C||(A?h++:""),pattern:C&&!A?l:A,prefix:x,suffix:T,modifier:d("MODIFIER")||""})}else m("END")}}return c}function o(e,t){return function(e,t){void 0===t&&(t={});var r=l(t),n=t.encode,o=void 0===n?function(e){return e}:n,f=t.validate,c=void 0===f||f,h=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:"+e.pattern+")$",r)}));return function(data){for(var path="",i=0;i<e.length;i++){var t=e[i];if("string"!=typeof t){var r=data?data[t.name]:void 0,n="?"===t.modifier||"*"===t.modifier,f="*"===t.modifier||"+"===t.modifier;if(Array.isArray(r)){if(!f)throw new TypeError('Expected "'+t.name+'" to not repeat, but got an array');if(0===r.length){if(n)continue;throw new TypeError('Expected "'+t.name+'" to not be empty')}for(var l=0;l<r.length;l++){var d=o(r[l],t);if(c&&!h[i].test(d))throw new TypeError('Expected all "'+t.name+'" to match "'+t.pattern+'", but got "'+d+'"');path+=t.prefix+d+t.suffix}}else if("string"!=typeof r&&"number"!=typeof r){if(!n){var m=f?"an array":"a string";throw new TypeError('Expected "'+t.name+'" to be '+m)}}else{d=o(String(r),t);if(c&&!h[i].test(d))throw new TypeError('Expected "'+t.name+'" to match "'+t.pattern+'", but got "'+d+'"');path+=t.prefix+d+t.suffix}}else path+=t}return path}}(n(e,t),t)}function f(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function l(e){return e&&e.sensitive?"":"i"}var c={props:{hasExtItem:!1},data:function(){return{levelList:null}},watch:{$route:function(){this.getBreadcrumb()}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var e=this.$route.matched.filter((function(e){return e.meta&&e.meta.title})),t=e[0];this.isHome(t)||(e=[{path:"/index",meta:{title:"首页"}}].concat(e)),this.levelList=e.filter((function(e){return e.meta&&e.meta.title&&!1!==e.meta.breadcrumb}))},isHome:function(e){var t=e&&e.name;return!!t&&t.trim().toLocaleLowerCase()==="index".toLocaleLowerCase()},pathCompile:function(path){var e=this.$route.params;return o(path)(e)},handleLink:function(e){var t=e.redirect,path=e.path;t?this.$router.push(t):this.$router.push(this.pathCompile(path))}}},h=(r(566),r(7)),component=Object(h.a)(c,(function(){var e=this,t=e._self._c;return t("el-breadcrumb",{staticClass:"app-breadcrumb",attrs:{separator:"/"}},[t("transition-group",{attrs:{name:"breadcrumb"}},[e._l(e.levelList,(function(r,n){return t("el-breadcrumb-item",{key:r.path},[0==n?t("span",[t("i",{staticClass:"el-icon-s-home"})]):e._e(),e._v(" "),"noRedirect"===r.redirect||n==e.levelList.length-1?t("span",{staticClass:"no-redirect"},[e._v(e._s(r.meta.title))]):t("a",{on:{click:function(t){return t.preventDefault(),e.handleLink(r)}}},[e._v(e._s(r.meta.title))])])})),e._v(" "),e.hasExtItem?t("el-breadcrumb-item",{key:"ext_item"},[e._t("ext_item")],2):e._e()],2)],1)}),[],!1,null,"66cc7143",null);t.default=component.exports}}]);
|