import{_ as l,b as e,d as a,p as s,w as t,H as n,i as u,o as c,f as i,k as d,e as o,y as f,F as h,V as m,W as _,X as r,a0 as k,t as b,Z as g,C as v}from"./index-2PZN6pGH.js";const C=l({data:()=>({title:"label",checkboxItems:[{name:"USA",value:"美国"},{name:"CHN",value:"中国",checked:"true"}],radioItems:[{name:"USA",value:"美国"},{name:"CHN",value:"中国",checked:"true"}],hidden:!1}),methods:{checkboxChange:function(l){var e=l.detail.value;console.log(e)},radioChange:function(l){var e=l.detail.value;console.log(e)}}},[["render",function(l,C,x,p,I,y){const H=e(a("page-head"),n),A=u,N=m,S=_,U=r,j=g,w=v,F=k;return c(),s(A,null,{default:t((()=>[i(H,{title:I.title},null,8,["title"]),i(A,{class:"uni-common-mt"},{default:t((()=>[i(A,{class:"uni-form-item uni-column"},{default:t((()=>[i(A,{class:"title"},{default:t((()=>[d("表单组件在label内")])),_:1}),i(U,{class:"uni-list",onChange:y.checkboxChange},{default:t((()=>[(c(!0),o(h,null,f(I.checkboxItems,(l=>(c(),s(S,{class:"uni-list-cell uni-list-cell-pd",key:l.name},{default:t((()=>[i(A,null,{default:t((()=>[i(N,{value:l.name,checked:l.checked},null,8,["value","checked"])])),_:2},1024),i(A,null,{default:t((()=>[d(b(l.value),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1},8,["onChange"])])),_:1}),i(A,{class:"uni-form-item uni-column"},{default:t((()=>[i(A,{class:"title"},{default:t((()=>[d("label用for标识表单组件")])),_:1}),i(F,{class:"uni-list",onChange:y.radioChange},{default:t((()=>[(c(!0),o(h,null,f(I.radioItems,((l,e)=>(c(),s(A,{class:"uni-list-cell uni-list-cell-pd",key:e},{default:t((()=>[i(A,null,{default:t((()=>[i(j,{id:l.name,value:l.name,checked:l.checked},null,8,["id","value","checked"])])),_:2},1024),i(S,{class:"label-2-text",for:l.name},{default:t((()=>[i(w,null,{default:t((()=>[d(b(l.value),1)])),_:2},1024)])),_:2},1032,["for"])])),_:2},1024)))),128))])),_:1},8,["onChange"])])),_:1}),i(A,{class:"uni-form-item uni-column"},{default:t((()=>[i(A,{class:"title"},{default:t((()=>[d("label内有多个时选中第一个")])),_:1}),i(U,{class:"uni-list",onChange:y.checkboxChange},{default:t((()=>[i(S,{class:"label-3"},{default:t((()=>[i(A,{class:"uni-list-cell uni-list-cell-pd"},{default:t((()=>[i(N,{class:"checkbox-3"},{default:t((()=>[d("选项一")])),_:1})])),_:1}),i(A,{class:"uni-list-cell uni-list-cell-pd"},{default:t((()=>[i(N,{class:"checkbox-3"},{default:t((()=>[d("选项二")])),_:1})])),_:1}),i(A,{class:"uni-link uni-center",style:{"margin-top":"20rpx"}},{default:t((()=>[d("点击该label下的文字默认选中第一个checkbox")])),_:1})])),_:1})])),_:1},8,["onChange"])])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-31f9d51c"]]);export{C as default};
