import{u as k}from"./useInstance.233fbdde.js";import{g as x}from"./record.2898e904.js";import{d as z,r as I,b as g,p as f,c as i,e as d,k as B,i as r,g as b,h as a,f as w,t as F,u as l}from"./index.0308b213.js";const E={class:"table"},U={key:0},P={key:1},A={class:"pagination"},j=z({props:{modelValue:{type:Boolean,default:!1},id:{default:0}},emits:["update:modelValue","onClose"],setup(h,{emit:c}){const m=h;k();const p=I(!1),t=g({page:1,limit:10,drawId:""}),u=g({list:[],count:0}),_=()=>{x(t).then(n=>{u.count=n.count||0,u.list=n.list||[]})};f(()=>m.modelValue,n=>{p.value=n,t.drawId=m.id,t.drawId>0&&_()}),f(()=>[t.page,t.limit],()=>{_()});const v=()=>{c("update:modelValue",!1),c("onClose")};return(n,o)=>{const s=i("el-table-column"),C=i("el-image"),D=i("el-table"),V=i("el-pagination"),y=i("el-dialog");return d(),B(y,{modelValue:p.value,"onUpdate:modelValue":o[2]||(o[2]=e=>p.value=e),title:"\u4E2D\u5956\u4FE1\u606F",width:"50%","destroy-on-close":"",onClose:v},{default:r(()=>[b("div",E,[a(D,{data:l(u).list,height:"400px"},{default:r(()=>[a(s,{label:"ID",prop:"id"}),a(s,{label:"UID",prop:"uid"}),a(s,{label:"\u7528\u6237\u5934\u50CF"},{default:r(e=>[a(C,{style:{width:"50px",height:"50px"},src:e.row.avatar},null,8,["src"])]),_:1}),a(s,{label:"\u7528\u6237\u6635\u79F0",prop:"nickname"}),a(s,{label:"\u5956\u54C1"},{default:r(e=>[e.row.prize_id>0?(d(),w("span",U,F(e.row.prize_name),1)):(d(),w("span",P,"\u6682\u672A\u4E2D\u5956"))]),_:1})]),_:1},8,["data"])]),b("div",A,[a(V,{currentPage:l(t).page,"onUpdate:currentPage":o[0]||(o[0]=e=>l(t).page=e),"page-size":l(t).limit,"onUpdate:page-size":o[1]||(o[1]=e=>l(t).limit=e),"page-sizes":[10,20,30,50,100],layout:"total, sizes, prev, pager, next, jumper",total:l(u).count},null,8,["currentPage","page-size","total"])])]),_:1},8,["modelValue"])}}});export{j as _};
