index-c36614c0.js 3.6 KB

1
  1. var c=(e,g,n)=>new Promise((C,v)=>{var x=a=>{try{m(n.next(a))}catch(s){v(s)}},b=a=>{try{m(n.throw(a))}catch(s){v(s)}},m=a=>a.done?C(a.value):Promise.resolve(a.value).then(x,b);m((n=n.apply(e,g)).next())});import{d as j,bA as B,bS as L,aL as F,a0 as G,cF as P,fl as H,W as O,r as k,A as T,ah as W,a4 as X,_ as q,y as _,o as y,l as h,a as t,e as d,w as $,X as i,N as R,O as J,c as K,t as z,H as Q,__tla as U}from"./index-b5895273.js";import{__tla as Y}from"./index-9d2b78f3.js";import Z,{__tla as aa}from"./view-ef94fe4d.js";import{u as ta,__tla as ea}from"./index-5eb30ce0.js";import{h as sa,b as N,__tla as la}from"./SystemUpdateMessageController-f2f3c0fd.js";import{__tla as ra}from"./useWindowSizeFn-a59bee15.js";import{__tla as ia}from"./FullscreenOutlined-012b5e27.js";let V,na=Promise.all([(()=>{try{return U}catch(e){}})(),(()=>{try{return Y}catch(e){}})(),(()=>{try{return aa}catch(e){}})(),(()=>{try{return ea}catch(e){}})(),(()=>{try{return la}catch(e){}})(),(()=>{try{return ra}catch(e){}})(),(()=>{try{return ia}catch(e){}})()]).then(()=>c(void 0,null,function*(){const{t:e}=X(),g=j({components:{Popover:B,Badge:L,Icon:F,SvgIcon:G,MessageView:Z,Empty:P},setup(){const[a,{openModal:s}]=ta(),E=H(),{prefixCls:D}=O("header-notify");let f=k();const u=k([]),p=k(P.PRESENTED_IMAGE_SIMPLE);o(),f.value=setInterval(()=>{o()},1e4);function o(){return c(this,null,function*(){u.value=[];try{u.value=yield sa({})}catch(r){clearInterval(f.value)}})}const S=T(()=>u.value.length);function w(r){return c(this,null,function*(){yield N({id:r}),yield o()})}const I=r=>c(this,null,function*(){s(!0,{baseData:{id:r}}),yield N({id:r})}),M=()=>c(this,null,function*(){yield o()}),l=()=>{E("/door/message")};return W(()=>{clearInterval(f.value)}),{prefixCls:D,listData:u,count:S,simpleImage:p,numberStyle:{top:"0",right:"1px"},setRead:w,t:e,registerModal:a,handelView:I,handelSuccess:M,handelMore:l}}}),n={class:"flex items-center justify-between"},C={class:"flex items-center"},v=t("div",{class:"ml-1"},"\u7CFB\u7EDF\u6D88\u606F",-1),x=["onClick"],b=["onClick"];function m(a,s,E,D,f,u){const p=_("Icon"),o=_("Badge"),S=_("SvgIcon"),w=_("Empty"),I=_("Popover"),M=_("MessageView");return y(),h(R,null,[t("div",{class:i(a.prefixCls)},[d(I,{title:"",overlayClassName:`${a.prefixCls}__overlay`},{content:$(()=>[t("div",n,[t("div",C,[d(S,{name:"in-msg",size:16}),v]),t("div",{class:"flex items-center cursor-pointer",onClick:s[0]||(s[0]=(...l)=>a.handelMore&&a.handelMore(...l))},[t("div",{class:i(["mr-1",`${a.prefixCls}__overlay-move`])},"\u66F4\u591A",2),d(p,{icon:"material-symbols-light:double-arrow",size:16,color:"rgb(127, 127, 128)"})])]),a.listData.length>0?(y(!0),h(R,{key:0},J(a.listData,(l,r)=>(y(),h("div",{key:r},[r<5?(y(),h("div",{key:0,class:i(["mt-2",`${a.prefixCls}__overlay-list`])},[t("div",{class:i(`${a.prefixCls}__overlay-list-title`)},z(l.title),3),t("div",{class:i(`${a.prefixCls}__overlay-list-body`)},z(l.content),3),t("div",{class:i([`${a.prefixCls}__overlay-list-footer`,"flex justify-end items-center"])},[t("div",{class:"mr-4 cursor-pointer",onClick:A=>a.setRead(l.id)},"\u5FFD\u7565",8,x),t("div",{class:i([`${a.prefixCls}__overlay-list-footer-btn`,"cursor-pointer"]),onClick:A=>a.handelView(l.id)}," \u7ACB\u5373\u67E5\u770B ",10,b)],2)],2)):Q("",!0)]))),128)):(y(),K(w,{key:1}))]),default:$(()=>[d(o,{count:a.count,numberStyle:a.numberStyle,size:"small"},{default:$(()=>[d(p,{icon:"carbon:notification",size:"22"})]),_:1},8,["count","numberStyle"])]),_:1},8,["overlayClassName"])],2),d(M,{onRegister:a.registerModal,onSuccess:a.handelSuccess},null,8,["onRegister","onSuccess"])],64)}V=q(g,[["render",m]])}));export{na as __tla,V as default};