2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
import{d as e,a3 as s,W as a,a0 as t,$ as l,X as o,u as i,c as n,a4 as r,a5 as u,a6 as p,Y as c,a7 as d,F as m,Z as f,a8 as v,j as y,r as _,v as g,a9 as j,aa as h,a1 as x,a2 as b}from"../@vue/@vue.CJIZsLsR.js";import{_ as k}from"../vue/vue.DpJWj6Ky.js";import{K as z,N as C}from"../@ant-design/@ant-design.p8gD75gF.js";import{g as w,h as $,i as I,j as L,k as K,L as M,m as S,n as F}from"../ant-design-vue/ant-design-vue.Dh0eC-8y.js";import{_ as B}from"../_plugin-vue_export-helper/_plugin-vue_export-helper.BCo6x5W8.js";import{b as H,u as N}from"../vue-router/vue-router.B92OrnBw.js";import{S as P}from"../../assets/index-DHDuxNml.js";import"../@ctrl/@ctrl.B2IeE8ye.js";import"../@babel/@babel.1FNH1IQo.js";import"../lodash-es/lodash-es.xwmpKtYY.js";import"../resize-observer-polyfill/resize-observer-polyfill.CzGuHLZU.js";import"../async-validator/async-validator.Cuo4gI4y.js";import"../scroll-into-view-if-needed/scroll-into-view-if-needed.CC-zn_OY.js";import"../compute-scroll-into-view/compute-scroll-into-view.DCNUDwgY.js";import"../throttle-debounce/throttle-debounce.w9OM8Bxz.js";import"../dom-align/dom-align.CwhutA7q.js";import"../dayjs/dayjs.BYs295sK.js";import"../@emotion/@emotion.BqFXxR3o.js";import"../stylis/stylis.IVPcsLSI.js";import"../vue-types/vue-types.BB_Jk3wA.js";import"../pinia/pinia.1NTCjJvz.js";import"../pinia-plugin-persistedstate/pinia-plugin-persistedstate.Cs-f0Iqr.js";import"../axios/axios.BYXpELat.js";const U={class:"flex-justify-between h-f"},W={class:"flex-center"},X={class:"margin-right flex-center"},Y=B(e({__name:"LayoutHeader",props:{collapsed:{type:Boolean},collapsedModifiers:{}},emits:["update:collapsed"],setup(e){const r=s(e,"collapsed");return(e,s)=>{const u=w;return a(),t("div",U,[l("div",W,[r.value?(a(),o(i(z),{key:0,class:"trigger",onClick:s[0]||(s[0]=()=>r.value=!r.value)})):(a(),o(i(C),{key:1,class:"trigger",onClick:s[1]||(s[1]=()=>r.value=!r.value)}))]),l("div",X,[n(u)])])}}}),[["__scopeId","data-v-bbea4d80"]]),Z=["href"],q=e({__name:"IconFont",props:{fontClass:{},size:{default:20},type:{default:"svg"}},setup:e=>(e,s)=>"class"===e.type?(a(),t("i",{key:0,class:r([`iconfont ${e.fontClass}`]),style:u({fontSize:`${e.size}px`})},null,6)):"svg"===e.type?(a(),t("svg",{key:1,style:u({width:`${e.size}px`,height:`${e.size}px`})},[l("use",{href:`#${e.fontClass}`},null,8,Z)],4)):p("",!0)}),A={class:"margin-left-xs"},D={class:"margin-left-xs"},E=e({__name:"MenuItem",props:{menuList:{default:()=>[]}},setup(e){const s=H();return(e,r)=>{const u=c("menu-item",!0),p=$,y=I;return a(!0),t(m,null,d(e.menuList,(e=>(a(),t(m,null,["dir"===e.type?(a(),o(p,{key:e.path},{icon:f((()=>[n(q,{"font-class":e.icon},null,8,["font-class"])])),title:f((()=>[l("span",A,v(e.title),1)])),default:f((()=>[n(u,{"menu-list":e.children},null,8,["menu-list"])])),_:2},1024)):(a(),o(y,{key:e.path,onClick:()=>i(s).push(e.path)},{icon:f((()=>[n(q,{"font-class":e.icon},null,8,["font-class"])])),default:f((()=>[l("span",D,v(e.title),1)])),_:2},1032,["onClick"]))],64)))),256)}}}),G=B(e({__name:"SystemMenus",setup(e){const s=N(),t=y((()=>[s.path]));return(e,s)=>{const l=L;return a(),o(l,{selectedKeys:t.value,mode:"inline","inline-collapsed":!1,class:"system-menus"},{default:f((()=>[n(E,{"menu-list":i(P)},null,8,["menu-list"])])),_:1},8,["selectedKeys"])}}}),[["__scopeId","data-v-8d4789b2"]]),J=e=>(x("data-v-5385a8ef"),e=e(),b(),e),O={key:0,class:"title flex-center"},Q=[J((()=>l("div",null,"保安后台",-1)))],R={key:1,class:"logo flex-center"},T=[J((()=>l("img",{src:k,title:"保安后台",alt:"xx"},null,-1)))],V=B(e({__name:"layout",setup(e){const s=_(!1),l=_([]);return(e,i)=>{const r=M,u=S,p=c("router-view"),d=F,m=K;return a(),o(m,{class:"main-content"},{default:f((()=>[n(r,{collapsed:s.value,theme:"light",trigger:null,collapsible:""},{default:f((()=>[s.value?(a(),t("div",R,T)):(a(),t("div",O,Q)),n(G)])),_:1},8,["collapsed"]),n(m,null,{default:f((()=>[n(u,{class:"layout-header"},{default:f((()=>[n(Y,{collapsed:s.value,"onUpdate:collapsed":i[0]||(i[0]=e=>s.value=e)},null,8,["collapsed"])])),_:1}),n(d,{class:"layout-content"},{default:f((()=>[n(p,null,{default:f((({Component:e,route:s})=>[n(g,{appear:"",name:"fade-transform",mode:"out-in"},{default:f((()=>[(a(),o(j,{include:l.value},[(a(),o(h(e),{key:s.fullPath}))],1032,["include"]))])),_:2},1024)])),_:1})])),_:1})])),_:1})])),_:1})}}}),[["__scopeId","data-v-5385a8ef"]]);export{V as default};
|