System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785"],(function(e,a){"use strict";var t,l,i,s,u,o,n,r,p,g,d,c,f,v,m,y,h,x,w,S,P,z,k,K,$,_;return{setters:[e=>{t=e.ao,l=e.aH,i=e.aI},e=>{s=e.g},e=>{u=e.p,o=e.at,n=e.ax},e=>{r=e.k,p=e.an,g=e.R,d=e.O,c=e.r,f=e.c,v=e.ar,m=e.e,y=e.a0,h=e.w,x=e.$,w=e.a8,S=e.a9,P=e.q,z=e.s,k=e.S,K=e.ao,$=e.N,_=e.n}],execute:function(){e("_",r({__name:"index",props:K({data:{default:()=>[]},rowKey:{default:"id"},loading:{type:Boolean,default:!1},loadingNum:{default:10},isPage:{type:Boolean,default:!1},maxHeight:{},columns:{default:()=>[]},rowProps:{},storeKey:{}},{page:{default:()=>({page:1,pageSize:10})},pageModifiers:{}}),emits:["update:page"],setup(e){const a=e,r=p(e,"page"),{t:K}=g(),{columns:j,data:H}=d(a),N=()=>u($(j.value)),b=c(N()),B=N(),C=f((()=>{const{rowKey:e}=a;return t(e)?a=>a[e]:e})),E=f((()=>{const{storeKey:e}=a;return e?`${e}-page`:""})),q=c([]),I=v(),J=m({style:{width:"100%"},showSizePicker:!0,showQuickJumper:!0,pageSizes:[10,20,50,100],prefix:()=>I.pagePrefix?.(),suffix:e=>y("span",{class:"text-13px text-default"},[K("Public.Table.Page.index_4",[e.itemCount])]),onChange:e=>{r.value.page=e},onUpdatePageSize:e=>{r.value.page=1,r.value.pageSize=e,E.value&&l(E.value,String(e))}});(()=>{if(E.value){const e=i(E.value);e&&(r.value.pageSize=s(e))}})();const M=f((()=>({...J,page:r.value.page,pageSize:r.value.pageSize})));return h((()=>H.value),(e=>{a.loading||(q.value=e)}),{deep:!0}),h((()=>a.loading),(e=>{if(e){if(b.value.forEach((e=>{"selection"!==e.type&&(e.ellipsis&&delete e.ellipsis,e.render=()=>y(n,null,null))})),0===H.value.length)for(let l=0;l<a.loadingNum;l++){const e={},{rowKey:i}=a;e[t(i)?i:"id"]=l,q.value.push(e)}}else q.value=[],_((()=>{b.value.forEach(((e,a)=>{if("selection"===e.type)return;const t=B[a];t.ellipsis&&(e.ellipsis=t.ellipsis),e.render=t.render})),q.value=H.value}))}),{immediate:!0}),h((()=>a.columns),(()=>{b.value=N(),B.splice(0,B.length),B.push(...N())}),{deep:!0}),(e,a)=>{const t=o;return x(),w(t,z(e.$attrs,{data:k(q),"max-height":e.maxHeight,"row-key":k(C),columns:k(b),pagination:!!e.isPage&&k(M),"row-props":e.rowProps}),{empty:S((()=>[P(e.$slots,"empty")])),default:S((()=>[P(e.$slots,"pagePrefix")])),_:3},16,["data","max-height","row-key","columns","pagination","row-props"])}}}))}}}));
