demo16.js 3.3 KB

1
  1. import{c as C}from"./mobile.js";import{_ as V}from"./index.js";import{m as o,r as E,e as b,j as s,g as i,o as B}from"./vendor.js";const{createDemo:k}=C("datepicker"),U=k({props:{},setup(){const e=o(!1),u=o(!1),d=o(!1),a=o(!1),m=o(!1),p=[e,u,d,a,m],l=new Date(2020,0,1),t=o("2020-1-1"),n=o("2020-1-1"),F=o("2020\u5E74-1\u6708-1\u65E5-0\u65F6-0\u5206"),D=o("0\u65F6-0\u5206-0\u79D2"),f=o("0\u65F6-0\u5206-0\u79D2"),v=[t,n,F,D,f];return{show:e,show2:u,show3:d,show4:a,show5:m,desc1:t,desc2:n,desc3:F,desc4:D,desc5:f,currentDate:l,minDate:new Date(2020,0,1),maxDate:new Date(2025,10,1),open:r=>{p[r].value=!0},confirm:(r,w)=>{v[r].value=w.join("-")}}}}),$={class:"demo"},j=i("h2",null,"\u6BCF\u5217\u4E0D\u663E\u793A\u4E2D\u6587",-1),y=i("h2",null,"\u9650\u5236\u5F00\u59CB\u7ED3\u675F\u65F6\u95F4",-1),A=i("h2",null,"\u9650\u5236\u5F00\u59CB\u7ED3\u675F\u65F6\u95F4\uFF08\u6709\u9ED8\u8BA4\u503C\uFF09",-1),L=i("h2",null,"\u9650\u5236\u5F00\u59CB\u7ED3\u675F\u5C0F\u65F6",-1),N=i("h2",null,"\u5206\u949F\u6570\u9012\u589E\u6B65\u957F\u8BBE\u7F6E",-1);function g(e,u,d,a,m,p){const l=E("nut-cell"),t=E("nut-datepicker");return B(),b("div",$,[j,s(l,{title:"\u65E5\u671F\u9009\u62E9",desc:e.desc1,onClick:u[0]||(u[0]=n=>e.open(0))},null,8,["desc"]),y,s(l,{title:"\u65E5\u671F\u9009\u62E9",desc:e.desc2,onClick:u[1]||(u[1]=n=>e.open(1))},null,8,["desc"]),A,s(l,{title:"\u65E5\u671F\u65F6\u95F4\u9009\u62E9",desc:e.desc3,onClick:u[2]||(u[2]=n=>e.open(2))},null,8,["desc"]),L,s(l,{title:"\u65F6\u95F4\u9009\u62E9",desc:e.desc4,onClick:u[3]||(u[3]=n=>e.open(3))},null,8,["desc"]),N,s(l,{title:"\u65F6\u95F4\u9009\u62E9",desc:e.desc5,onClick:u[4]||(u[4]=n=>e.open(4))},null,8,["desc"]),s(t,{modelValue:e.currentDate,"onUpdate:modelValue":u[5]||(u[5]=n=>e.currentDate=n),onConfirm:u[6]||(u[6]=n=>{e.confirm(0,n)}),visible:e.show,"onUpdate:visible":u[7]||(u[7]=n=>e.show=n),"is-show-chinese":!1},null,8,["modelValue","visible"]),s(t,{modelValue:e.currentDate,"onUpdate:modelValue":u[8]||(u[8]=n=>e.currentDate=n),title:"\u65E5\u671F\u9009\u62E9","min-date":e.minDate,"max-date":e.maxDate,onConfirm:u[9]||(u[9]=n=>{e.confirm(1,n)}),visible:e.show2,"onUpdate:visible":u[10]||(u[10]=n=>e.show2=n),"is-show-chinese":!1},null,8,["modelValue","min-date","max-date","visible"]),s(t,{modelValue:e.currentDate,"onUpdate:modelValue":u[11]||(u[11]=n=>e.currentDate=n),title:"\u65E5\u671F\u65F6\u95F4\u9009\u62E9",type:"datetime","min-date":e.minDate,"max-date":e.maxDate,onConfirm:u[12]||(u[12]=n=>{e.confirm(2,n)}),visible:e.show3,"onUpdate:visible":u[13]||(u[13]=n=>e.show3=n)},null,8,["modelValue","min-date","max-date","visible"]),s(t,{modelValue:e.currentDate,"onUpdate:modelValue":u[14]||(u[14]=n=>e.currentDate=n),title:"\u65F6\u95F4\u9009\u62E9",type:"time","min-date":e.minDate,"max-date":e.maxDate,onConfirm:u[15]||(u[15]=n=>{e.confirm(3,n)}),visible:e.show4,"onUpdate:visible":u[16]||(u[16]=n=>e.show4=n)},null,8,["modelValue","min-date","max-date","visible"]),s(t,{modelValue:e.currentDate,"onUpdate:modelValue":u[17]||(u[17]=n=>e.currentDate=n),title:"\u65F6\u95F4\u9009\u62E9",type:"time","min-date":e.minDate,"minute-step":5,"max-date":e.maxDate,onConfirm:u[18]||(u[18]=n=>{e.confirm(4,n)}),visible:e.show5,"onUpdate:visible":u[19]||(u[19]=n=>e.show5=n)},null,8,["modelValue","min-date","max-date","visible"])])}var H=V(U,[["render",g]]);export{H as default};