You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/main-nav.vue_vue_type_style...

2 lines
2.0 KiB

import{Z as B}from"./index-43cab287.js";import{u as E}from"./vuex-613b371d.js";import{u as N}from"./vue-router-8af5a3a6.js";import{j as P}from"./vooks-423a5f30.js";import{D as S,y as A,z as C,F as D}from"./@vicons-7ee3dafd.js";import{a3 as R,a4 as I,j as V,e as j,a5 as x,h as F}from"./naive-ui-374a973f.js";import{d as H,r as h,j as L,o as a,c as f,Z as o,U as e,a0 as t,N as c,a as U,P as _,e as q,L as Z,F as $}from"./@vue-b8d06722.js";const G={key:0},J={class:"navbar"},oe=H({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=E(),m=N(),l=h(!1),k=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return L(()=>{localStorage.getItem("PAOPAO_THEME")||u(P()==="dark")}),(s,d)=>{const y=B,b=R,O=I,r=V,p=j,M=x,T=F;return a(),f($,null,[o(n).state.drawerModelShow?(a(),f("div",G,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=z=>l.value=z),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[U("div",J,[o(n).state.drawerModelShow&&!s.back?(a(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(S))]),_:1})]),_:1})):c("",!0),s.back?(a(),_(p,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(A))]),_:1})]),_:1})):c("",!0),q(" "+Z(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:o(C)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:o(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _};