import{_ as t,b as e,h as i,d as s,o as l,p as n,w as o,f as c,a4 as a,e as u,F as r,y as d,B as p,k as _,t as v,C as m,i as f,R as y}from"./index-2PZN6pGH.js";import{_ as C}from"./uni-section.BISPxi99.js";const g=t({name:"UniSteps",props:{direction:{type:String,default:"row"},activeColor:{type:String,default:"#2979FF"},deactiveColor:{type:String,default:"#B7BDC6"},active:{type:Number,default:0},activeIcon:{type:String,default:"checkbox-filled"},options:{type:Array,default:()=>[]}},data:()=>({})},[["render",function(t,y,C,g,h,w){const k=m,b=f,x=e(s("uni-icons"),i);return l(),n(b,{class:"uni-steps"},{default:o((()=>[c(b,{class:a(["column"===C.direction?"uni-steps__column":"uni-steps__row"])},{default:o((()=>[c(b,{class:a(["column"===C.direction?"uni-steps__column-text-container":"uni-steps__row-text-container"])},{default:o((()=>[(l(!0),u(r,null,d(C.options,((t,e)=>(l(),n(b,{key:e,class:a(["column"===C.direction?"uni-steps__column-text":"uni-steps__row-text"])},{default:o((()=>[c(k,{style:p({color:e===C.active?C.activeColor:C.deactiveColor}),class:a(["column"===C.direction?"uni-steps__column-title":"uni-steps__row-title"])},{default:o((()=>[_(v(t.title),1)])),_:2},1032,["style","class"]),c(k,{style:p({color:C.deactiveColor}),class:a(["column"===C.direction?"uni-steps__column-desc":"uni-steps__row-desc"])},{default:o((()=>[_(v(t.desc),1)])),_:2},1032,["style","class"])])),_:2},1032,["class"])))),128))])),_:1},8,["class"]),c(b,{class:a(["column"===C.direction?"uni-steps__column-container":"uni-steps__row-container"])},{default:o((()=>[(l(!0),u(r,null,d(C.options,((t,e)=>(l(),n(b,{class:a(["column"===C.direction?"uni-steps__column-line-item":"uni-steps__row-line-item"]),key:e},{default:o((()=>[c(b,{class:a(["column"===C.direction?"uni-steps__column-line":"uni-steps__row-line","column"===C.direction?"uni-steps__column-line--before":"uni-steps__row-line--before"]),style:p({backgroundColor:e<=C.active&&0!==e?C.activeColor:0===e?"transparent":C.deactiveColor})},null,8,["class","style"]),e===C.active?(l(),n(b,{key:0,class:a(["column"===C.direction?"uni-steps__column-check":"uni-steps__row-check"])},{default:o((()=>[c(x,{color:C.activeColor,type:C.activeIcon,size:"14"},null,8,["color","type"])])),_:1},8,["class"])):(l(),n(b,{key:1,class:a(["column"===C.direction?"uni-steps__column-circle":"uni-steps__row-circle"]),style:p({backgroundColor:e<C.active?C.activeColor:C.deactiveColor})},null,8,["class","style"])),c(b,{class:a(["column"===C.direction?"uni-steps__column-line":"uni-steps__row-line","column"===C.direction?"uni-steps__column-line--after":"uni-steps__row-line--after"]),style:p({backgroundColor:e<C.active&&e!==C.options.length-1?C.activeColor:e===C.options.length-1?"transparent":C.deactiveColor})},null,8,["class","style"])])),_:2},1032,["class"])))),128))])),_:1},8,["class"])])),_:1},8,["class"])])),_:1})}],["__scopeId","data-v-633474a6"]]);const h=t({components:{},data:()=>({active:1,list1:[{title:"事件一"},{title:"事件二"},{title:"事件三"},{title:"事件四"}],list2:[{title:"买家下单",desc:"2018-11-11"},{title:"卖家发货",desc:"2018-11-12"},{title:"买家签收",desc:"2018-11-13"},{title:"交易完成",desc:"2018-11-14"}]}),methods:{change(){this.active<this.list1.length-1?this.active+=1:this.active=0}}},[["render",function(t,i,a,u,r,d){const p=e(s("uni-steps"),g),v=e(s("uni-section"),C),m=y,h=f;return l(),n(h,null,{default:o((()=>[c(v,{title:"基本用法",type:"line",padding:""},{default:o((()=>[c(p,{options:r.list1,active:r.active},null,8,["options","active"])])),_:1}),c(v,{title:"自定义图标",type:"line",padding:""},{default:o((()=>[c(p,{options:r.list1,"active-icon":"checkbox",active:r.active},null,8,["options","active"])])),_:1}),c(v,{title:"自定义图标",type:"line",padding:""},{default:o((()=>[c(p,{options:r.list1,"active-icon":"medal",active:r.active},null,8,["options","active"])])),_:1}),c(v,{title:"纵向排列",type:"line",padding:""},{default:o((()=>[c(p,{options:r.list2,"active-color":"#007AFF",active:r.active,direction:"column"},null,8,["options","active"])])),_:1}),c(m,{type:"primary",size:"mini",style:{margin:"30px 10px",width:"100px"},onClick:d.change},{default:o((()=>[_("改变状态")])),_:1},8,["onClick"])])),_:1})}],["__scopeId","data-v-4bdb4ae1"]]);export{h as default};
