import{l as a,a4 as e,$ as s,x as t,a3 as l,q as o,a1 as r,a2 as i}from"./utils-lib.js?v=20260328163632";import{B as n}from"./index91.js?v=20260328163632";import{Z as u}from"./wsl.js?v=20260328163632";import{p}from"./useMethod9.js?v=20260328163632";import{d,u as m}from"./index50.js?v=20260328163632";import{r as c,k as f,w as g,o as h,J as v,V as _,_ as x,a3 as j,Y as k,O as y,N as S,X as z,Z as b}from"./base-lib.js?v=20260328163632";import{au as w}from"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index97.js?v=20260328163632";const C=c(!1),R=c(""),V=c({columns:[{title:a("镜像名"),key:"name"},{title:a("Start数"),key:"star_count"},{title:a("Pull数"),key:"pull_count"},{title:a("更新时间"),key:"last_updated",render:a=>d(a.last_updated)},{title:a("描述/说明"),key:"description"},e([{title:a("拉取"),onClick:a=>p(a.name)}])],data:[]}),q=c({page:1,pageSize:10,itemCount:0,pageSlot:5}),[A,Z]=s(V),[B]=l(q),H=()=>{q.value.page=1,J()},J=async a=>{t({loading:C,request:u({...a?{force:a}:{},search:R.value,p:q.value.page,limit:q.value.pageSize}),success:a=>{V.value.data=Array.isArray(a.data.data)?a.data.data:[],q.value.itemCount=a.data.page.count||0}})},L=()=>{C.value=!1,V.value.data=[]},M={class:"text-14px text-[var(--text-color-2)]"},N=f({__name:"index",setup(e){const{isRefreshList:s}=m();return g((()=>s.value),(a=>{a&&(J(),s.value=!1)})),h(J),v(L),(e,s)=>{const t=w;return _(),x(k(i),null,{"header-left":j((()=>s[2]||(s[2]=[]))),"header-right":j((()=>[y(t,{class:"!gap-10px"},{default:j((()=>[y(k(o),{modelValue:k(R),"onUpdate:modelValue":s[0]||(s[0]=a=>S(R)?R.value=a:null),placeholder:k(a)("请输入镜像"),class:"!w-[220px]",onSearch:k(H)},null,8,["modelValue","placeholder","onSearch"]),y(k(n),{onRefresh:s[1]||(s[1]=()=>k(J)(1))})])),_:1})])),content:j((()=>[y(k(A),{loading:k(C)},null,8,["loading"])])),"footer-left":j((()=>s[3]||(s[3]=[]))),"footer-right":j((()=>[y(k(B),{"show-size-picker":"","page-sizes":k(r)([10,20,50,100]),onRefresh:k(J)},{suffix:j((()=>[z("span",M,b(k(a)("共 {0} 条",[k(q).itemCount])),1)])),_:1},8,["page-sizes","onRefresh"])])),_:1})}}});export{N as default};
