import{a1 as k,k as C,aR as w,a0 as b}from"./index.17037962789732.js";import"./index.170379627897336.js";import"./index.170379627897322.js";import"./index.170379627897323.js";import"./index.170379627897315.js";import"./index.1703796278973301.js";import{a as o}from"./dayjs.min.1703796278973.js";import{d as j,k as m,p as O,m as R,o as x,c as T,a as n,b as l,u as c,t as r,M as B}from"./vue.1703796278973.js";const z=j({__name:"TimeComponent",props:{modelValue:{type:Object,default:void 0}},emits:["update:modelValue"],setup(_,{emit:d}){const i=_,u=m("today"),s=m(),f=e=>{d("update:modelValue",e),u.value=""},p=e=>{let a=0;const t=new Date().getTime();return e==="today"?a=o().startOf("day").valueOf():e==="week"?a=o().subtract(6,"days").valueOf():e==="month"&&(a=o().subtract(29,"days").valueOf()),[o(a),o(t)]},v=e=>{const a=e.target.value;u.value=a,d("update:modelValue",p(a))};return O(()=>{u.value="today",d("update:modelValue",p("today"))}),R(()=>i.modelValue,e=>{s.value=e},{immediate:!0,deep:!0}),(e,a)=>{const t=k,g=C,V=w,h=b;return x(),T(h,null,{default:n(()=>[l(g,{value:c(u),"button-style":"solid",onChange:v},{default:n(()=>[l(t,{value:"today"},{default:n(()=>[r("今日")]),_:1}),l(t,{value:"week"},{default:n(()=>[r("近一周")]),_:1}),l(t,{value:"month"},{default:n(()=>[r("近一月")]),_:1})]),_:1},8,["value"]),l(V,{"show-time":"",value:c(s),"onUpdate:value":a[0]||(a[0]=y=>B(s)?s.value=y:null),placeholder:["开始时间","结束时间"],onChange:f,allowClear:!1},null,8,["value"])]),_:1})}}});export{z as _};
