import{d as D,r as v,G as z,g as d,J as N,c as T,k as f,K as V,e as a,z as $,w as l,t as o,x as r,b as q,_ as A}from"./index-CUnFTKV2.js";const E={class:"qylevel-table"},I={class:"points-value"},L=D({__name:"QyLevelTable",props:{data:{},loading:{type:Boolean},total:{},page:{},pageSize:{}},emits:["page-change","size-change","edit","prizes","delete"],setup(c,{emit:b}){const p=c,s=b,g=v(p.page),u=v(p.pageSize);z(()=>p.page,t=>{g.value=t}),z(()=>p.pageSize,t=>{u.value=t});const h=t=>{s("page-change",t)},C=t=>{s("size-change",t)},k=t=>{s("edit",t)},y=t=>{s("prizes",t)},w=t=>{s("delete",t)};return(t,n)=>{const i=d("el-table-column"),x=d("el-tag"),_=d("el-button"),S=d("el-table"),P=d("el-pagination"),B=N("loading");return f(),T("div",E,[V((f(),$(S,{data:c.data,border:"",stripe:""},{default:l(()=>[a(i,{prop:"id",label:"ID",width:"70",align:"center"}),a(i,{label:"等级",width:"80",align:"center"},{default:l(({row:e})=>[a(x,{type:"primary",size:"small"},{default:l(()=>[o(r(e.level),1)]),_:2},1024)]),_:1}),a(i,{prop:"title",label:"等级名称","min-width":"150"},{default:l(({row:e})=>[o(r(e.title||"-"),1)]),_:1}),a(i,{label:"所需欧气值",width:"120",align:"center"},{default:l(({row:e})=>[q("span",I,r(e.requiredPoints??0),1)]),_:1}),a(i,{label:"创建时间",width:"170",align:"center"},{default:l(({row:e})=>[o(r(e.createdAt||"-"),1)]),_:1}),a(i,{label:"更新时间",width:"170",align:"center"},{default:l(({row:e})=>[o(r(e.updatedAt||"-"),1)]),_:1}),a(i,{label:"操作",width:"200",align:"center",fixed:"right"},{default:l(({row:e})=>[a(_,{type:"primary",link:"",size:"small",onClick:m=>k(e)},{default:l(()=>[...n[2]||(n[2]=[o(" 编辑 ",-1)])]),_:1},8,["onClick"]),a(_,{type:"success",link:"",size:"small",onClick:m=>y(e)},{default:l(()=>[...n[3]||(n[3]=[o(" 奖品 ",-1)])]),_:1},8,["onClick"]),a(_,{type:"danger",link:"",size:"small",onClick:m=>w(e)},{default:l(()=>[...n[4]||(n[4]=[o(" 删除 ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data"])),[[B,c.loading]]),a(P,{"current-page":g.value,"onUpdate:currentPage":n[0]||(n[0]=e=>g.value=e),"page-size":u.value,"onUpdate:pageSize":n[1]||(n[1]=e=>u.value=e),"page-sizes":[10,20,50,100],total:c.total,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:C,onCurrentChange:h,class:"pagination"},null,8,["current-page","page-size","total"])])}}}),U=A(L,[["__scopeId","data-v-feeae110"]]);export{U as default};
