import{q as z}from"./elementPlus.CqHltQSO.js";import{u as B,a as M}from"./useTableData.DHj98pR6.js";import{M as _}from"./Columns.DS8p9XoK.js";import{_ as T}from"./DataTableSlot.vue_vue_type_script_setup_true_lang.DKC15_BF.js";import{r as D}from"./index.DoJnwA7v.js";import{d as R,r as y,Z as H,E as L,j as O,ai as r,o as C,M as h,aa as U,a8 as j,O as i,u as t,K as E,B as I,U as s}from"./vue.1RczIYhx.js";import{_ as P}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./countryInfo.Df1X6FZ-.js";import"./useTagColor.B-JXlmrE.js";const $="/api/choice/marketplace_shops/";function G(c){return D({url:$,method:"GET",params:c})}const K=R({__name:"DataTable",setup(c,{expose:b}){const o=I("query-parameter"),{tableOptions:f,handlePageChange:v}=B(l),u=y(),e=H({id:"market-store-table",keepSource:!0,size:"small",border:!1,round:!0,stripe:!0,currentRowHighLight:!0,height:"100%",customConfig:{storage:{visible:!0}},toolbarConfig:{size:"large",slots:{tools:"toolbar_tools"}},rowConfig:{isHover:!0},columnConfig:{},pagerConfig:{total:f.value.total,page:f.value.page,limit:f.value.limit},loading:!1,loadingConfig:{icon:"vxe-icon-indicator roll",text:"正在拼命加载中..."},columns:"",data:""});L(()=>{e.pagerConfig.limit=20}),O(()=>{l()});async function l(m=!1){var p,g;m&&(e.pagerConfig.page=1),e.data=[],e.columns=[];const a={country_code:o==null?void 0:o.country,region:o==null?void 0:o.region,shop:o==null?void 0:o.shop,platform_number:o==null?void 0:o.platformId};await M(G,a,e),e&&((p=e.data)!=null&&p.length)&&await u.value.loadColumn(_),e.showHeader=!!((g=e.data)!=null&&g.length)}function x(){l()}return b({fetchList:l}),(m,a)=>{const p=r("el-icon"),g=r("el-button"),k=r("vxe-pager"),w=r("el-empty"),S=r("vxe-grid");return C(),h(S,E({ref_key:"gridRef",ref:u},t(e)),U({toolbar_tools:i(()=>[s(g,{circle:"",class:"toolbar-btn",onClick:x},{default:i(()=>[s(p,null,{default:i(()=>[s(t(z))]),_:1})]),_:1})]),pager:i(()=>[s(k,{currentPage:t(e).pagerConfig.page,"onUpdate:currentPage":a[0]||(a[0]=n=>t(e).pagerConfig.page=n),pageSize:t(e).pagerConfig.limit,"onUpdate:pageSize":a[1]||(a[1]=n=>t(e).pagerConfig.limit=n),total:t(e).pagerConfig.total,class:"mt-1.5",onPageChange:t(v)},null,8,["currentPage","pageSize","total","onPageChange"])]),empty:i(()=>[s(w,{description:"暂无数据"})]),_:2},[j(t(_),n=>({name:`${n.field}`,fn:i(({row:d})=>[(C(),h(T,{key:d.id,field:n.field,row:d},null,8,["field","row"]))])}))]),1040)}}}),Y=P(K,[["__scopeId","data-v-f3159479"]]);export{Y as default};
