custom-layout.js 2.0 KB

1
  1. "use strict";const e=require("../../common/vendor.js");if(!Array){const o=e.resolveComponent("custom-nav-bar"),r=e.resolveComponent("custom-refresher"),n=e.resolveComponent("custom-nomore"),a=e.resolveComponent("z-paging");(o+r+n+a)()}const b=()=>"./custom-nav-bar.js",v=()=>"./custom-refresher.js",B=()=>"./custom-nomore.js",C=()=>"../../uni_modules/z-paging/components/z-paging/z-paging.js";Math||(b+v+B+C)();const _={__name:"custom-layout",props:{title:{type:String,default:""},titleColor:{type:String,default:"#000000"},modelValue:{type:Array,default:[]},topHeight:{type:Number,default:80},refresheronly:{type:Boolean,default:!1},refresherEnabled:{type:Boolean,default:!0},showBottom:{type:Boolean,default:!1},backgroundColor:{type:String,default:"linear-gradient(to top right, #CDDC39, #8BC34A, #FFEB3B)"},back:{type:Object,default:function(){return{show:!0}}},showPageBottom:{type:Boolean,default:!1},showLoadingNomore:{type:Boolean,default:!0}},emits:["update:modelValue","layoutquery","refresh","scroll"],setup(o,{expose:r,emit:n}){const a=n,s=o,c=e.computed({get:()=>s.modelValue?s.modelValue:[],set:t=>{a("update:modelValue",t)}}),u=e.ref();function d(t){u.value.scrollScroll(t.detail.scrollTop),a("scroll",t.detail.scrollTop)}function g(t,f){a("layoutquery",{pageNo:t,pageSize:f})}function h(){a("refresh")}const m=e.ref();function y(t){m.value.complete(t)}return r({complete:y}),(t,f)=>e.e({a:e.sr(u,"22885f19-1,22885f19-0",{k:"navbar"}),b:e.p({"background-color":o.backgroundColor,back:o.back,backgroundImageShow:!0,topHeight:o.topHeight,title:o.title,"title-color":o.titleColor}),c:o.showPageBottom},o.showPageBottom?{}:{},{d:e.w(({refresherStatus:l},p,i)=>({a:"22885f19-2-"+i+",22885f19-0",b:e.p({status:l}),c:i,d:p}),{name:"refresher",path:"d",vueId:"22885f19-0"}),e:o.showLoadingNomore},o.showLoadingNomore?{}:{},{f:e.sr(m,"22885f19-0",{k:"paging"}),g:e.o(h),h:e.o(d),i:e.o(g),j:e.o(l=>c.value=l),k:e.p({refresherEnabled:o.refresherEnabled,refresherOnly:o.refresheronly,modelValue:c.value})})}};wx.createComponent(_);