import{t as l,_ as p}from"./@vue.96c135a1.js";function m(i){const{page:o=1,size:c=15,fetchFun:g,params:e={},firstLoading:r=!1,invariantParams:u=[]}=i,s=Object.assign({},l(e)),a=p({page:o,size:c,loading:r,count:0,lists:[],extend:{}}),n=()=>(a.loading=!0,g({page_no:a.page,page_size:a.size,...e}).then(t=>(a.count=t==null?void 0:t.count,a.lists=t==null?void 0:t.lists,a.extend=t==null?void 0:t.extend,Promise.resolve(t))).catch(t=>Promise.reject(t)).finally(()=>{a.loading=!1}));return{pager:a,getLists:n,resetParams:()=>{Object.keys(s).forEach(t=>{u.includes(t)||(e[t]=s[t])}),n()},resetPage:()=>{a.page=1,n()}}}export{m as u};
