index-4327d5c1.js 1.8 KB

1
  1. import{d as y,r as i,z as V,o as Y,c as k,i as t,w as s,l as c,a as f,R as p,aH as z,m as n,da as H,ak as M,q as P,_ as R,__tla as C}from"./index-2f799233.js";import{g as S,c as U,e as q,h as O,i as $,__tla as j}from"./formatTime-2157894c.js";let x,A=Promise.all([(()=>{try{return C}catch{}})(),(()=>{try{return j}catch{}})()]).then(async()=>{let d;d={class:"flex flex-row items-center gap-2"},x=R(y({name:"ShortcutDateRangePicker",__name:"index",emits:["change"],setup(B,{expose:h,emit:v}){const l=i(7),e=i(["",""]);h({times:e});const g=[{text:"\u6628\u5929",value:()=>S(new Date,-1)},{text:"\u6700\u8FD17\u5929",value:()=>U()},{text:"\u672C\u6708",value:()=>[n().startOf("M"),n().subtract(1,"d")]},{text:"\u6700\u8FD130\u5929",value:()=>q()},{text:"\u6700\u8FD11\u5E74",value:()=>O()}],m=async()=>{(function(){const u=n().subtract(l.value,"d"),a=n().subtract(1,"d");e.value=$(u,a)})(),await _()},w=v,_=async()=>{w("change",e.value)};return V(()=>{m()}),(u,a)=>{const o=H,D=M,b=P;return Y(),k("div",d,[t(D,{modelValue:f(l),"onUpdate:modelValue":a[0]||(a[0]=r=>p(l)?l.value=r:null),onChange:m},{default:s(()=>[t(o,{label:1},{default:s(()=>[c("\u6628\u5929")]),_:1}),t(o,{label:7},{default:s(()=>[c("\u6700\u8FD17\u5929")]),_:1}),t(o,{label:30},{default:s(()=>[c("\u6700\u8FD130\u5929")]),_:1})]),_:1},8,["modelValue"]),t(b,{modelValue:f(e),"onUpdate:modelValue":a[1]||(a[1]=r=>p(e)?e.value=r:null),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],shortcuts:g,class:"!w-240px",onChange:_},null,8,["modelValue","default-time"]),z(u.$slots,"default")])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/components/ShortcutDateRangePicker/index.vue"]])});export{x as _,A as __tla};