"use strict";const e=require("../../vendor.js");if(!Array){(e.resolveComponent("hs-empty")+e.resolveComponent("u-loading-icon"))()}Math||((()=>"../../../components/hs-empty/hs-empty.js")+(()=>"../../../node-modules/uview-plus/components/u-loading-icon/u-loading-icon.js"))();const t=e.defineComponent({__name:"cc-scroll-loading",props:{meta:{type:Object,default:{}},showLoad:{type:Boolean,default:!0}},emits:["load"],setup(t,{emit:a}){const o=t,l=e.ref(""),n=e.ref(!1),u=e.ref({page:1,perPage:20});e.watch((()=>null==o?void 0:o.meta),(()=>{const{current_page:e,last_page:t}=o.meta,a=e<t;n.value=a,l.value=a?"上拉加载更多":"已经到底啦～",console.log(null==o?void 0:o.meta,"meta数据变化")})),e.onMounted((()=>{const{current_page:e,last_page:t}=o.meta,a=e<t;n.value=a,l.value=a?"上拉加载更多":"已经到底啦～"}));return e.onReachBottom((()=>{const{current_page:e,last_page:t}=o.meta,s=e<t;n.value=s,l.value=s?"上拉加载更多":"已经到底啦～",s&&(u.value.page=e+1,a("load",u.value),setTimeout((()=>{n.value=!1,l.value=""}),1e3))})),(t,a)=>{var u,s;return e.e({a:!(null==(u=o.meta)?void 0:u.total)},(null==(s=o.meta)?void 0:s.total)?e.e({c:e.p({text:l.value,mode:"circle",size:"30rpx",show:n.value}),d:!n.value},n.value?{}:{e:e.t(l.value)}):{b:e.p({height:"30vh"})})}}}),a=e._export_sfc(t,[["__scopeId","data-v-b30b93c5"]]);wx.createComponent(a);
