import{_ as e,b as t,d as l,p as a,w as s,i as n,o as c,f as u,k as i,v as o,e as d,y as r,F as _,C as f,a0 as m,t as y,B as h,Z as p}from"./index-2PZN6pGH.js";import{_ as v}from"./uni-card.CpdfOoXJ.js";import{_ as C}from"./uni-segmented-control.C5vm5CRB.js";import{_ as k}from"./uni-section.BISPxi99.js";const x=e({components:{},data:()=>({items:["选项卡1","选项卡2","选项卡3"],styles:[{value:"button",text:"按钮",checked:!0},{value:"text",text:"文字"}],colors:["#007aff","#4cd964","#dd524d"],current:0,colorIndex:0,activeColor:"#007aff",styleType:"button"}),methods:{onClickItem(e){this.current!==e.currentIndex&&(this.current=e.currentIndex)},styleChange(e){this.styleType!==e.detail.value&&(this.styleType=e.detail.value)},colorChange(e){this.styleType!==e.detail.value&&(console.log(e.detail.value),this.activeColor=e.detail.value)}}},[["render",function(e,x,g,I,b,T){const j=f,w=t(l("uni-card"),v),q=t(l("uni-segmented-control"),C),B=n,F=t(l("uni-section"),k),S=p,Z=m;return c(),a(B,null,{default:s((()=>[u(w,{"is-shadow":!1,"is-full":""},{default:s((()=>[u(j,{class:"uni-h6"},{default:s((()=>[i("标签组件多用于商品分类、重点内容显示等场景。")])),_:1})])),_:1}),u(F,{title:"实心标签",type:"line"},{default:s((()=>[u(B,{class:"uni-padding-wrap uni-common-mt"},{default:s((()=>[u(q,{current:b.current,values:b.items,"style-type":b.styleType,"active-color":b.activeColor,onClickItem:T.onClickItem},null,8,["current","values","style-type","active-color","onClickItem"])])),_:1}),u(B,{class:"content"},{default:s((()=>[0===b.current?(c(),a(B,{key:0},{default:s((()=>[u(j,{class:"content-text"},{default:s((()=>[i("选项卡1的内容")])),_:1})])),_:1})):o("",!0),1===b.current?(c(),a(B,{key:1},{default:s((()=>[u(j,{class:"content-text"},{default:s((()=>[i("选项卡2的内容")])),_:1})])),_:1})):o("",!0),2===b.current?(c(),a(B,{key:2},{default:s((()=>[u(j,{class:"content-text"},{default:s((()=>[i("选项卡3的内容")])),_:1})])),_:1})):o("",!0)])),_:1})])),_:1}),u(F,{title:"Style",type:"line"}),u(B,{class:"example-body"},{default:s((()=>[u(Z,{class:"uni-list",onChange:T.styleChange},{default:s((()=>[(c(!0),d(_,null,r(b.styles,((e,t)=>(c(),a(B,{key:t,class:"uni-list-item"},{default:s((()=>[u(B,{class:"uni-list-item__container"},{default:s((()=>[u(B,{class:"uni-list-item__content"},{default:s((()=>[u(j,{class:"uni-list-item__content-title"},{default:s((()=>[i(y(e.text),1)])),_:2},1024)])),_:2},1024),u(B,{class:"uni-list-item__extra"},{default:s((()=>[u(S,{value:e.value,checked:e.checked},null,8,["value","checked"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1},8,["onChange"])])),_:1}),u(F,{title:"Color",type:"line"}),u(B,{class:"example-body"},{default:s((()=>[u(Z,{class:"uni-list",onChange:T.colorChange},{default:s((()=>[(c(!0),d(_,null,r(b.colors,((e,t)=>(c(),a(B,{key:t,class:"uni-list-item"},{default:s((()=>[u(B,{class:"uni-list-item__container"},{default:s((()=>[u(B,{class:"uni-list-item__content"},{default:s((()=>[u(B,{style:h({backgroundColor:e}),class:"color-tag"},null,8,["style"])])),_:2},1024),u(B,{class:"uni-list-item__extra"},{default:s((()=>[u(S,{value:e,checked:t===b.colorIndex},null,8,["value","checked"])])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1},8,["onChange"])])),_:1})])),_:1})}],["__scopeId","data-v-18f0e2d9"]]);export{x as default};
