import{_ as e,b as l,d as a,p as t,w as u,H as n,i as s,o as c,f as d,k as i,e as o,y as f,F as m,V as _,W as h,X as r,C as v,t as k}from"./index-2PZN6pGH.js";const p=e({data:()=>({title:"checkbox 复选框",items:[{value:"USA",name:"美国"},{value:"CHN",name:"中国",checked:"true"},{value:"BRA",name:"巴西"},{value:"JPN",name:"日本"},{value:"ENG",name:"英国"},{value:"FRA",name:"法国"}]}),methods:{checkboxChange:function(e){for(var l=this.items,a=e.detail.value,t=0,u=l.length;t<u;++t){const e=l[t];a.indexOf(e.value)>=0?this.$set(e,"checked",!0):this.$set(e,"checked",!1)}}}},[["render",function(e,p,C,b,g,x){const F=l(a("page-head"),n),y=s,w=_,A=h,N=r,H=v;return c(),t(y,null,{default:u((()=>[d(F,{title:g.title},null,8,["title"]),d(y,{class:"uni-padding-wrap uni-common-mt"},{default:u((()=>[d(y,{class:"uni-title uni-common-mt"},{default:u((()=>[i("默认样式")])),_:1}),d(y,null,{default:u((()=>[d(N,null,{default:u((()=>[d(A,null,{default:u((()=>[d(w,{value:"cb1",checked:"true"}),i("选中 ")])),_:1}),d(A,null,{default:u((()=>[d(w,{value:"cb"}),i("未选中 ")])),_:1})])),_:1})])),_:1}),d(y,{class:"uni-title uni-common-mt"},{default:u((()=>[i("不同颜色和尺寸的checkbox")])),_:1}),d(y,null,{default:u((()=>[d(N,null,{default:u((()=>[d(A,null,{default:u((()=>[d(w,{value:"cb1",checked:"true",color:"#FFCC33",style:{transform:"scale(0.7)"}}),i("选中 ")])),_:1}),d(A,null,{default:u((()=>[d(w,{value:"cb",color:"#FFCC33",style:{transform:"scale(0.7)"}}),i("未选中 ")])),_:1})])),_:1})])),_:1})])),_:1}),d(y,{class:"uni-padding-wrap"},{default:u((()=>[d(y,{class:"uni-title uni-common-mt"},{default:u((()=>[i(" 推荐展示样式 "),d(H,null,{default:u((()=>[i("\\n使用 uni-list 布局")])),_:1})])),_:1})])),_:1}),d(y,{class:"uni-list"},{default:u((()=>[d(N,{onChange:x.checkboxChange},{default:u((()=>[(c(!0),o(m,null,f(g.items,(e=>(c(),t(A,{class:"uni-list-cell uni-list-cell-pd",key:e.value},{default:u((()=>[d(y,null,{default:u((()=>[d(w,{value:e.value,checked:e.checked},null,8,["value","checked"])])),_:2},1024),d(y,null,{default:u((()=>[i(k(e.name),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1},8,["onChange"])])),_:1})])),_:1})}],["__scopeId","data-v-9c5fd396"]]);export{p as default};
