import{_ as e,b as t,d as l,p as a,w as i,H as n,i as s,o as u,f as d,k as c,t as r,a5 as m}from"./index-2PZN6pGH.js";function o(e){const t=new Date;let l=t.getFullYear(),a=t.getMonth()+1,i=t.getDate();return"start"===e?l-=10:"end"===e&&(l+=10),a=a>9?a:"0"+a,i=i>9?i:"0"+i,`${l}-${a}-${i}`}const f=e({data:()=>({title:"picker",array:[{name:"中国"},{name:"美国"},{name:"巴西"},{name:"日本"}],index:0,multiArray:[["亚洲","欧洲"],["中国","日本"],["北京","上海","广州"]],multiIndex:[0,0,0],date:o({format:!0}),startDate:o("start"),endDate:o("end"),time:"12:01"}),methods:{bindPickerChange:function(e){console.log("picker发送选择改变，携带值为："+e.detail.value),this.index=e.detail.value},bindMultiPickerColumnChange:function(e){switch(console.log("修改的列为："+e.detail.column+"，值为："+e.detail.value),this.multiIndex[e.detail.column]=e.detail.value,e.detail.column){case 0:switch(this.multiIndex[0]){case 0:this.multiArray[1]=["中国","日本"],this.multiArray[2]=["北京","上海","广州"];break;case 1:this.multiArray[1]=["英国","法国"],this.multiArray[2]=["伦敦","曼彻斯特"]}this.multiIndex.splice(1,1,0),this.multiIndex.splice(2,1,0);break;case 1:switch(this.multiIndex[0]){case 0:switch(this.multiIndex[1]){case 0:this.multiArray[2]=["北京","上海","广州"];break;case 1:this.multiArray[2]=["东京","北海道"]}break;case 1:switch(this.multiIndex[1]){case 0:this.multiArray[2]=["伦敦","曼彻斯特"];break;case 1:this.multiArray[2]=["巴黎","马赛"]}}this.multiIndex.splice(2,1,0)}this.$forceUpdate()},bindDateChange:function(e){this.date=e.detail.value},bindTimeChange:function(e){this.time=e.detail.value}}},[["render",function(e,o,f,h,_,g){const p=t(l("page-head"),n),b=s,x=m;return u(),a(b,null,{default:i((()=>[d(p,{title:_.title},null,8,["title"]),d(b,{class:"uni-title uni-common-pl"},{default:i((()=>[c("普通选择器")])),_:1}),d(b,{class:"uni-list"},{default:i((()=>[d(b,{class:"uni-list-cell"},{default:i((()=>[d(b,{class:"uni-list-cell-left"},{default:i((()=>[c(" 当前选择 ")])),_:1}),d(b,{class:"uni-list-cell-db"},{default:i((()=>[d(x,{onChange:g.bindPickerChange,value:_.index,range:_.array,"range-key":"name"},{default:i((()=>[d(b,{class:"uni-input"},{default:i((()=>[c(r(_.array[_.index].name),1)])),_:1})])),_:1},8,["onChange","value","range"])])),_:1})])),_:1})])),_:1}),d(b,{class:"uni-title uni-common-pl"},{default:i((()=>[c("多列选择器")])),_:1}),d(b,{class:"uni-list"},{default:i((()=>[d(b,{class:"uni-list-cell"},{default:i((()=>[d(b,{class:"uni-list-cell-left"},{default:i((()=>[c(" 当前选择 ")])),_:1}),d(b,{class:"uni-list-cell-db"},{default:i((()=>[d(x,{mode:"multiSelector",onColumnchange:g.bindMultiPickerColumnChange,value:_.multiIndex,range:_.multiArray},{default:i((()=>[d(b,{class:"uni-input"},{default:i((()=>[c(r(_.multiArray[0][_.multiIndex[0]])+"，"+r(_.multiArray[1][_.multiIndex[1]])+"，"+r(_.multiArray[2][_.multiIndex[2]]),1)])),_:1})])),_:1},8,["onColumnchange","value","range"])])),_:1})])),_:1})])),_:1}),d(b,{class:"uni-title uni-common-pl"},{default:i((()=>[c("时间选择器")])),_:1}),d(b,{class:"uni-list"},{default:i((()=>[d(b,{class:"uni-list-cell"},{default:i((()=>[d(b,{class:"uni-list-cell-left"},{default:i((()=>[c(" 当前选择 ")])),_:1}),d(b,{class:"uni-list-cell-db"},{default:i((()=>[d(x,{mode:"time",value:_.time,start:"09:01",end:"21:01",onChange:g.bindTimeChange},{default:i((()=>[d(b,{class:"uni-input"},{default:i((()=>[c(r(_.time),1)])),_:1})])),_:1},8,["value","onChange"])])),_:1})])),_:1})])),_:1}),d(b,{class:"uni-picker-tips"},{default:i((()=>[c(" 注：选择 09:01 ~ 21:01 之间的时间, 不在区间内不能选中 ")])),_:1}),d(b,{class:"uni-title uni-common-pl"},{default:i((()=>[c("日期选择器")])),_:1}),d(b,{class:"uni-list"},{default:i((()=>[d(b,{class:"uni-list-cell"},{default:i((()=>[d(b,{class:"uni-list-cell-left"},{default:i((()=>[c(" 当前选择 ")])),_:1}),d(b,{class:"uni-list-cell-db"},{default:i((()=>[d(x,{mode:"date",value:_.date,start:_.startDate,end:_.endDate,onChange:g.bindDateChange},{default:i((()=>[d(b,{class:"uni-input"},{default:i((()=>[c(r(_.date),1)])),_:1})])),_:1},8,["value","start","end","onChange"])])),_:1})])),_:1})])),_:1}),d(b,{class:"uni-picker-tips"},{default:i((()=>[c(" 注：选择当前时间 ±10 年之间的时间, 不在区间内不能选中 ")])),_:1})])),_:1})}],["__scopeId","data-v-49307fb3"]]);export{f as default};
