import{u as y}from"./hooks.428ba1c3.js";import{b as T,k as u,o as d,h as i,A as l,j as t,l as _,t as f,f as p,bv as w,E as c,bw as B,a as E}from"./index.4d3e3847.js";const F={class:"w-full flex justify-between"},g=E("p",null,"\u64CD\u4F5C",-1),D=T({__name:"ladder-table",props:{ladder:null,type:null,readonly:{type:Boolean}},emits:["choose","delete","update"],setup(o,{emit:s}){return(v,b)=>{const a=u("ElTableColumn"),k=u("ElImage"),C=u("ElTag"),r=u("ElButton"),x=u("ElTooltip"),h=u("ElTable");return d(),i(h,{size:"small",border:"",data:o.ladder},{default:l(()=>[t(a,{prop:"name",label:"\u987A\u5E8F",width:"60px"},{default:l(({$index:n})=>[_(f(n+1),1)]),_:1}),t(a,{prop:"img",label:"\u56FE\u7247",width:"50px"},{default:l(({$index:n,row:e})=>[t(k,{fit:"cover",lazy:"","z-index":"99999","preview-teleported":!0,src:e.img,"preview-src-list":e.img!==""?[e.img]:[]},null,8,["src","preview-src-list"])]),_:1}),t(a,{prop:"jump_type",label:"\u8DF3\u8F6C\u7C7B\u578B",width:"85px"},{default:l(({row:n})=>[t(C,null,{default:l(()=>{var e;return[_(f(((e=p(w).find(({id:m})=>m===n.jump_type+""))==null?void 0:e.label)||"--"),1)]}),_:2},1024)]),_:1}),t(a,{prop:"jump_param",label:"\u8DF3\u8F6C\u5730\u5740"}),o.type==="2"||o.type===2?(d(),i(a,{key:0,prop:"title",label:"\u6807\u9898",width:"70px"})):c("",!0),o.type==="4"||o.type===4?(d(),i(a,{key:1,prop:"style_type",label:"\u6837\u5F0F\u7C7B\u578B",width:"70px"},{default:l(({row:n})=>[t(C,null,{default:l(()=>{var e;return[_(f(((e=p(B).find(({id:m})=>m===n.style_type+""))==null?void 0:e.label)||"--"),1)]}),_:2},1024)]),_:1})):c("",!0),o.readonly?c("",!0):(d(),i(a,{key:2,width:"70px"},{header:l(()=>[E("div",F,[g,t(x,{content:"\u6DFB\u52A0\u6570\u636E",placement:"top"},{default:l(()=>[t(r,{link:"",icon:p(y)("add"),onClick:b[0]||(b[0]=()=>s("choose"))},null,8,["icon"])]),_:1})])]),default:l(({$index:n,row:e})=>[o.type!=="3"&&o.type!==3?(d(),i(r,{key:0,link:"",icon:p(y)("edits"),onClick:()=>s("update",{data:e,index:n})},null,8,["icon","onClick"])):c("",!0),t(r,{link:"",icon:p(y)("delete"),onClick:()=>s("delete",n)},null,8,["icon","onClick"])]),_:1}))]),_:1},8,["data"])}}});export{D as _};
