dist 更新
This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{v as q,D as T,_ as J,d as K,c as g,b as p,l as Q,f as u,H as X,B as Y,w as a,I as L,h as l,u as o,F as S,e as n,G as Z,o as i,g as c,z as r,x as ee,i as E,p as te,j as le,m as oe}from"./index.9e912d9b.js";import{t as f}from"./date.86e91942.js";import{s as ae}from"./settings.89e47c65.js";import"./number.46c8fb59.js";const ne=q.create(),se=()=>ne({url:"https://holidays-jp.github.io/api/v1/2023/date.json",method:"GET"}),de={"Content-Type":"application/json;charsetset=UTF-8"},ie=_=>T({url:"/calendar/api/v1/event",method:"PUT",data:_}),ue=()=>T({url:"/calendar/api/v1/event",method:"GET",headers:de});const U=_=>(te("data-v-0e3dfbc2"),_=_(),le(),_),re={key:0,class:"date-cell-holiday"},ce=["onClick"],_e=U(()=>c("br",null,null,-1)),me={key:1,class:"date-cell"},pe=["onClick"],fe=["onClick"],ve={key:2,class:"date-cell-event"},he=U(()=>c("span",null,"\u5F85\u529E\u4E8B\u9879",-1)),be={class:"dialog-footer"},ge=E("Cancel"),ke=E(" Confirm "),ye=K({setup(_){const v=ae(),k=g({}),y=g([]),x=g({}),d=g({reminder_date:"",title:"",reminder_info:""}),D=p(new Date),m=p(!1),h="140px",w=p(!1),B=p(!0),F=p([]),$=["email","messageBox","\u624B\u673A\u77ED\u4FE1","\u5FAE\u4FE1\u901A\u77E5"],C=s=>{d.reminder_date=f(s),m.value=!0},N=async()=>{await ie(d).then(()=>{}),m.value=!1,O("refresh")},O=s=>{s==="refresh"&&(v.settings.isLoading=!0,v.settings.isRouterAlive=!1,oe(()=>{v.settings.isRouterAlive=!0,v.settings.isLoading=!1}))};return Q(async()=>{await se().then(s=>{Object.keys(s.data).forEach(t=>{k[t]=s.data[t]})}),await ue().then(s=>{y.length=0,s.data.forEach(t=>{y.push(t),x[t.reminder_date]=t.title})}),w.value=!0,B.value=!1}),(s,t)=>{const G=n("el-calendar"),V=n("el-table-column"),R=n("el-table"),b=n("el-form-item"),A=n("el-input"),z=n("el-checkbox"),H=n("el-checkbox-group"),M=n("el-form"),j=n("el-button"),P=n("el-dialog"),W=Z("loading");return i(),u(S,null,[w.value?X((i(),Y(G,{key:0,modelValue:D.value,"onUpdate:modelValue":t[0]||(t[0]=e=>D.value=e),"element-loading-text":"\u4E3B\u4EBA\uFF0C\u522B\u7740\u6025\u6211\u5728\u52AA\u529B\u52A0\u8F7D\u4E2D^_^"},{dateCell:a(({data:e})=>[Object.keys(o(k)).includes(o(f)(e.date))?(i(),u("div",re,[c("span",{style:{color:"red"},onClick:I=>C(e.date)},r(e.date.getDate()),9,ce),_e,c("span",null,r(o(k)[o(f)(e.date)]),1)])):(i(),u("div",me,[e.date.getDay()==0||e.date.getDay()==6?(i(),u("span",{key:0,style:{color:"red"},onClick:I=>C(e.date)},r(e.date.getDate()),9,pe)):(i(),u("span",{key:1,onClick:I=>C(e.date)},r(e.date.getDate()),9,fe))])),Object.keys(o(x)).includes(o(f)(e.date))?(i(),u("div",ve,[c("span",null,r(o(x)[o(f)(e.date)]),1)])):L("",!0)]),_:1},8,["modelValue"])),[[W,B.value]]):L("",!0),he,l(R,{data:o(y)},{default:a(()=>[l(V,{property:"reminder_date",label:"Date",width:"150"}),l(V,{property:"title",label:"title",width:"200"}),l(V,{property:"reminder_info",label:"eventInfo"})]),_:1},8,["data"]),l(P,{modelValue:m.value,"onUpdate:modelValue":t[5]||(t[5]=e=>m.value=e),title:"\u5F85\u529E\u4E8B\u9879"},{footer:a(()=>[c("span",be,[l(j,{onClick:t[4]||(t[4]=e=>m.value=!1)},{default:a(()=>[ge]),_:1}),l(j,{type:"primary",onClick:N},{default:a(()=>[ke]),_:1})])]),default:a(()=>[l(M,{model:o(d)},{default:a(()=>[l(b,{label:"\u65E5\u671F","label-width":h},{default:a(()=>[c("span",null,r(o(d).reminder_date),1)]),_:1}),l(b,{label:"title","label-width":h},{default:a(()=>[l(A,{modelValue:o(d).title,"onUpdate:modelValue":t[1]||(t[1]=e=>o(d).title=e),autocomplete:"off"},null,8,["modelValue"])]),_:1}),l(b,{label:"eventInfo","label-width":h},{default:a(()=>[l(A,{modelValue:o(d).reminder_info,"onUpdate:modelValue":t[2]||(t[2]=e=>o(d).reminder_info=e),autocomplete:"off",type:"textarea"},null,8,["modelValue"])]),_:1}),l(b,{label:"alert","label-width":h},{default:a(()=>[l(H,{modelValue:F.value,"onUpdate:modelValue":t[3]||(t[3]=e=>F.value=e),min:0,max:2},{default:a(()=>[(i(),u(S,null,ee($,e=>l(z,{key:e,label:e},{default:a(()=>[E(r(e),1)]),_:2},1032,["label"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});var De=J(ye,[["__scopeId","data-v-0e3dfbc2"]]);export{De as default};
|
||||
Reference in New Issue
Block a user