You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
haoliang-net/deploy-web/admin/assets/PageHeader-yD9tr7GF.js

1 line
1.5 KiB
JavaScript

import{E as e,I as t,M as n,O as r,_ as i,b as a,c as o,g as s,h as c,i as l,k as u,m as d,n as f,p,x as m,y as h,z as g}from"./index-yNQwsZKK.js";var _={class:`page-header`,style:{"margin-bottom":`12px`}},v={style:{display:`flex`,"align-items":`center`,gap:`12px`}},y={style:{"font-size":`16px`,"font-weight":`600`}},b=l(m({__name:`PageHeader`,props:{title:{},showBack:{type:Boolean}},setup(l){let m=l.showBack??!0,b=f(),x=typeof window<`u`&&window.location.pathname.startsWith(`/mock`),S=x?`/mock/dashboard`:`/dashboard`,C=p(()=>{let e=b.path;return e.startsWith(`/machine`)?`设备管理`:e.startsWith(`/worker`)?`工人管理`:e.startsWith(`/collect-address`)?`采集地址`:`管理中心`}),w=p(()=>(x?`/mock`:``)+b.path.split(`?`)[0]),T=p(()=>C.value);return(f,p)=>{let b=u(`router-link`),x=u(`el-breadcrumb-item`),C=u(`el-breadcrumb`),E=u(`el-icon`),D=u(`el-button`);return e(),i(`div`,_,[r(f.$slots,`breadcrumb`,{},()=>[a(C,{separator:`/`,style:{margin:`0 0 12px 0`}},{default:n(()=>[a(x,null,{default:n(()=>[a(b,{to:t(S)},{default:n(()=>[...p[1]||=[h(`首页`,-1)]]),_:1},8,[`to`])]),_:1}),a(x,null,{default:n(()=>[a(b,{to:w.value},{default:n(()=>[h(g(T.value),1)]),_:1},8,[`to`])]),_:1}),a(x,null,{default:n(()=>[h(g(l.title),1)]),_:1})]),_:1})],!0),d(`div`,v,[t(m)?(e(),c(D,{key:0,onClick:p[0]||=e=>f.$router.back()},{default:n(()=>[a(E,null,{default:n(()=>[a(t(o))]),_:1}),p[2]||=h(` 返回`,-1)]),_:1})):s(``,!0),d(`span`,y,g(l.title),1)])])}}}),[[`__scopeId`,`data-v-59b2f881`]]);export{b as t};