import{u as f}from"./hooks.428ba1c3.js";import{b,k as a,o as c,h as p,A as e,j as o,l as s,t as k,a as i,f as y,E as B}from"./index.4d3e3847.js";const E={class:"w-full flex justify-between"},x=i("p",null,"\u64CD\u4F5C",-1),A=b({__name:"ladder-table",props:{ladder:null,readonly:{type:Boolean}},emits:["choose","delete","update"],setup(d,{emit:n}){return(T,r)=>{const t=a("ElTableColumn"),u=a("ElButton"),m=a("ElTooltip"),_=a("ElTable");return c(),p(_,{size:"small",border:"",data:d.ladder},{default:e(()=>[o(t,{prop:"name",label:"\u987A\u5E8F"},{default:e(({$index:l})=>[s(k(l+1),1)]),_:1}),o(t,{prop:"key",label:"\u7C7B\u578B"}),o(t,{prop:"value",label:"\u7C7B\u578B\u503C"}),d.readonly?B("",!0):(c(),p(t,{key:0},{header:e(()=>[i("div",E,[x,o(m,{content:"\u6DFB\u52A0\u9636\u68AF",placement:"top"},{default:e(()=>[o(u,{link:"",icon:y(f)("add"),onClick:r[0]||(r[0]=()=>n("choose"))},null,8,["icon"])]),_:1})])]),default:e(({$index:l,row:C})=>[o(u,{text:"",type:"primary",size:"small",onClick:()=>n("update",{data:C,index:l})},{default:e(()=>[s("\u7F16\u8F91")]),_:2},1032,["onClick"]),o(u,{text:"",type:"primary",size:"small",onClick:()=>n("delete",l)},{default:e(()=>[s("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1}))]),_:1},8,["data"])}}});export{A as _};
