| 123456789 |
- /**
- * 由 Fantastic-admin 提供技术支持
- * Powered by Fantastic-admin
- * Gitee https://gitee.com/hooray/fantastic-admin
- * Github https://github.com/hooray/fantastic-admin
- */
-
- import{_ as $}from"./index.vue_vue_type_script_setup_true_name_SvgIcon_lang-9ad2d3e0.js";import{e as L}from"./runtime-dom.esm-bundler-e65f1c43.js";import V from"./index-cef9145c.js";import{u as G}from"./settings-be8974ad.js";import{u as U}from"./menu-2c9c5182.js";import{I as q}from"./injectionKeys-03976c05.js";import{u as z}from"./vue-router-8a13d09b.js";import{j as I,G as J,a as S,a3 as T,k as y,l as M,m as X,u as f,q as P,E,y as w,B as R,x as O,F as j,X as K,C as Q,D as W}from"./runtime-core.esm-bundler-5fc1c360.js";import{_ as Y}from"./_plugin-vue_export-helper-c27b6911.js";import"./iconify-3d8b277a.js";import"./index.vue_vue_type_script_setup_true_name_I18nSelector_lang-982b3136.js";import"./vue-i18n.runtime.esm-bundler-b8e91312.js";import"./index-f5a92b18.js";import"./index-5cddd228.js";import"./_MapCache-1b613190.js";import"./index-ec920771.js";import"./notification-e460b8a8.js";import"./pinia-7162f4ce.js";import"./eventBus-d154090d.js";import"./useMainPage-98075516.js";import"./index-c228ae8f.js";import"./iframe-10768394.js";function Z(t){for(var n=[],e=0;e<t.length;){var s=t[e];if(s==="*"||s==="+"||s==="?"){n.push({type:"MODIFIER",index:e,value:t[e++]});continue}if(s==="\\"){n.push({type:"ESCAPED_CHAR",index:e++,value:t[e++]});continue}if(s==="{"){n.push({type:"OPEN",index:e,value:t[e++]});continue}if(s==="}"){n.push({type:"CLOSE",index:e,value:t[e++]});continue}if(s===":"){for(var v="",i=e+1;i<t.length;){var c=t.charCodeAt(i);if(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||c===95){v+=t[i++];continue}break}if(!v)throw new TypeError("Missing parameter name at ".concat(e));n.push({type:"NAME",index:e,value:v}),e=i;continue}if(s==="("){var d=1,r="",i=e+1;if(t[i]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(i));for(;i<t.length;){if(t[i]==="\\"){r+=t[i++]+t[i++];continue}if(t[i]===")"){if(d--,d===0){i++;break}}else if(t[i]==="("&&(d++,t[i+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(i));r+=t[i++]}if(d)throw new TypeError("Unbalanced pattern at ".concat(e));if(!r)throw new TypeError("Missing pattern at ".concat(e));n.push({type:"PATTERN",index:e,value:r}),e=i;continue}n.push({type:"CHAR",index:e,value:t[e++]})}return n.push({type:"END",index:e,value:""}),n}function k(t,n){n===void 0&&(n={});for(var e=Z(t),s=n.prefixes,v=s===void 0?"./":s,i="[^".concat(ne(n.delimiter||"/#?"),"]+?"),c=[],d=0,r=0,u="",o=function(g){if(r<e.length&&e[r].type===g)return e[r++].value},a=function(g){var _=o(g);if(_!==void 0)return _;var N=e[r],F=N.type,H=N.index;throw new TypeError("Unexpected ".concat(F," at ").concat(H,", expected ").concat(g))},l=function(){for(var g="",_;_=o("CHAR")||o("ESCAPED_CHAR");)g+=_;return g};r<e.length;){var h=o("CHAR"),p=o("NAME"),b=o("PATTERN");if(p||b){var m=h||"";v.indexOf(m)===-1&&(u+=m,m=""),u&&(c.push(u),u=""),c.push({name:p||d++,prefix:m,suffix:"",pattern:b||i,modifier:o("MODIFIER")||""});continue}var x=h||o("ESCAPED_CHAR");if(x){u+=x;continue}u&&(c.push(u),u="");var D=o("OPEN");if(D){var m=l(),A=o("NAME")||"",C=o("PATTERN")||"",B=l();a("CLOSE"),c.push({name:A||(C?d++:""),pattern:A&&!C?i:C,prefix:m,suffix:B,modifier:o("MODIFIER")||""});continue}a("END")}return c}function ee(t,n){return te(k(t,n),n)}function te(t,n){n===void 0&&(n={});var e=re(n),s=n.encode,v=s===void 0?function(r){return r}:s,i=n.validate,c=i===void 0?!0:i,d=t.map(function(r){if(typeof r=="object")return new RegExp("^(?:".concat(r.pattern,")$"),e)});return function(r){for(var u="",o=0;o<t.length;o++){var a=t[o];if(typeof a=="string"){u+=a;continue}var l=r?r[a.name]:void 0,h=a.modifier==="?"||a.modifier==="*",p=a.modifier==="*"||a.modifier==="+";if(Array.isArray(l)){if(!p)throw new TypeError('Expected "'.concat(a.name,'" to not repeat, but got an array'));if(l.length===0){if(h)continue;throw new TypeError('Expected "'.concat(a.name,'" to not be empty'))}for(var b=0;b<l.length;b++){var m=v(l[b],a);if(c&&!d[o].test(m))throw new TypeError('Expected all "'.concat(a.name,'" to match "').concat(a.pattern,'", but got "').concat(m,'"'));u+=a.prefix+m+a.suffix}continue}if(typeof l=="string"||typeof l=="number"){var m=v(String(l),a);if(c&&!d[o].test(m))throw new TypeError('Expected "'.concat(a.name,'" to match "').concat(a.pattern,'", but got "').concat(m,'"'));u+=a.prefix+m+a.suffix;continue}if(!h){var x=p?"an array":"a string";throw new TypeError('Expected "'.concat(a.name,'" to be ').concat(x))}}return u}}function ne(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function re(t){return t&&t.sensitive?"":"i"}const ae={class:"toolbar-container"},ie={class:"left-box"},oe=I({name:"Toolbar"}),se=I({...oe,setup(t){const n=z(),e=G(),s=U(),v=J(q),i=S(()=>{var r;return e.mode==="mobile"||["side","head","single"].includes(e.settings.menu.menuMode)&&e.settings.menu.enableSubMenuCollapseButton&&!(e.settings.menu.subMenuOnlyOneHide&&s.sidebarMenus.length===1&&(!s.sidebarMenus[0].children||(r=s.sidebarMenus[0])!=null&&r.children.every(u=>{var o;return((o=u.meta)==null?void 0:o.sidebar)===!1})))}),c=S(()=>{var u,o,a;const r=[];if(e.settings.home.enable&&r.push({path:"/",title:e.settings.home.title,i18n:"route.home"}),n.name!=="home"&&e.settings.breadcrumb.enableMainMenu&&!["single"].includes(e.settings.menu.menuMode)){const l=s.allMenus.findIndex(h=>h.children.some(p=>n.fullPath.indexOf(`${p.path}/`)===0||n.fullPath===p.path));(u=s.allMenus[l])!=null&&u.meta&&r.push({path:"",title:(o=s.allMenus[l].meta)==null?void 0:o.title,i18n:(a=s.allMenus[l].meta)==null?void 0:a.i18n})}return n.meta.breadcrumbNeste&&r.push(...n.meta.breadcrumbNeste.filter(l=>l.hide===!1)),r});function d(r){return ee(r)(n.params)}return(r,u)=>{const o=$,a=T("el-icon"),l=T("el-breadcrumb-item"),h=T("el-breadcrumb");return y(),M("div",ae,[X("div",ie,[f(i)?(y(),M("div",{key:0,class:P(["sidebar-collapse",{"is-collapse":f(e).settings.menu.subMenuCollapse}]),onClick:u[0]||(u[0]=p=>f(e).toggleSidebarCollapse())},[E(a,null,{default:w(()=>[E(o,{name:"toolbar-collapse"})]),_:1})],2)):R("",!0),f(e).settings.breadcrumb.enable&&f(e).mode==="pc"&&f(e).settings.app.routeBaseOn!=="filesystem"?(y(),O(h,{key:1,class:P(["breadcrumb",{[`breadcrumb-${f(e).settings.breadcrumb.style}`]:f(e).settings.breadcrumb.style!==""}])},{default:w(()=>[E(L,{name:"breadcrumb"},{default:w(()=>[(y(!0),M(j,null,K(f(c),(p,b)=>(y(),O(l,{key:JSON.stringify(p),to:b<f(c).length-1&&p.path!==""?d(p.path):""},{default:w(()=>[Q(W(b<f(c).length-1?f(v)(p.i18n,p.title):f(e).titleFirst?f(e).title:f(v)(p.i18n,p.title)),1)]),_:2},1032,["to"]))),128))]),_:1})]),_:1},8,["class"])):R("",!0)]),E(V)])}}});const Pe=Y(se,[["__scopeId","data-v-e68c0ce9"]]);export{Pe as default};
|