"use strict";const e=require("../../common/vendor.js");if(!Array){e.resolveComponent("hs-cell")()}Math;const l=e.defineComponent({__name:"hs-date-picker",props:["valueModel","required","tip","title","hasFutureDate","borderTop","isLink","mode"],emits:["change","update:valueModel"],setup(l,{emit:o}){const u=l,a=e.ref(""),t=e.ref(""),d=e.ref(""),n=e=>{a.value=null==e?void 0:e.detail.value,o("update:valueModel",null==e?void 0:e.detail.value),o("change",null==e?void 0:e.detail.value)};return e.onMounted(()=>{const e=new Date;let l=e.getFullYear(),o=e.getMonth()+1,n=e.getDate();o=o>9?o:"0"+o,n=n>9?n:"0"+n,t.value=(null==u?void 0:u.hasFutureDate)?`${l}-${o}-${n}`:`${l-60}-${o}-${n}`,d.value=`${l+60}-${o}-${n}`,(null==u?void 0:u.valueModel)&&(a.value=null==u?void 0:u.valueModel)}),e.watch(()=>null==u?void 0:u.valueModel,e=>{console.log(e,"newVal"),a.value=null==u?void 0:u.valueModel}),(l,o)=>({a:e.p({title:(null==u?void 0:u.title)||"选择日期",required:null==u?void 0:u.required,borderTop:null==u?void 0:u.borderTop,value:a.value,isLink:!0,isLabelRight:!0,isPlaceholder:"请选择日期"}),b:(null==u?void 0:u.mode)||"date",c:u.valueModel,d:e.o(n),e:t.value,f:d.value})}});wx.createComponent(l);
