WokerTask/public/admin/assets/calenda1r.b523c8ce.js

2 lines
1.5 KiB
JavaScript

import{M as _,P as x}from"./vue-simple-calendar.f45a5eb9.js";import{d as n,r as f,b as l,o as v,c as y,W as s,Q as D,u as e}from"./@vue.f8dfc830.js";const g={id:"example-simple"},k=n({name:"task"}),P=n({...k,props:{list:{type:Array,default:()=>[]}},emits:["clickItem","initShowDate"],setup(p,{emit:r}){const c=p,i=f(new Date),d=t=>{i.value=t,r("initShowDate",t)},u=l(()=>{let t=[];return c.list.forEach(o=>{t.push({id:o.id,title:o.template_name,startDate:new Date(o.start_time),endDate:new Date(o.end_time)})}),t}),h=t=>{r("clickItem",t.id)},m=t=>{console.log(t)},a=l(()=>({top:"2.6em",height:"2.1em",border:"0px",previousYearLabel:"<<",previousPeriodLabel:"<",nextPeriodLabel:">",nextYearLabel:">>",currentPeriodLabel:"\u4ECA\u5929"}));return(t,o)=>(v(),y("div",g,[s(e(x),{"show-date":e(i),class:"holiday-us-traditional holiday-us-official holiday-ue theme-gcal","enable-drag-drop":!1,"item-top":e(a).top,"item-content-height":e(a).height,"item-border-height":e(a).border,onClickItem:h,onClickDate:m,items:e(u),"current-period-label":"\u4ECA\u65E5"},{header:D(({headerProps:b})=>[s(e(_),{"header-props":b,"previous-year-label":e(a).previousYearLabel,"previous-period-label":e(a).previousPeriodLabel,"next-period-label":e(a).nextPeriodLabel,"next-year-label":e(a).nextYearLabel,onInput:d},null,8,["header-props","previous-year-label","previous-period-label","next-period-label","next-year-label"])]),_:1},8,["show-date","item-top","item-content-height","item-border-height","items"])]))}});export{P as default};