finance-pay/public/mobile/assets/pages-news-news.8ce4ef9e.js

2 lines
9.7 KiB
JavaScript
Raw Permalink Normal View History

2023-11-15 12:02:33 +08:00
import{_ as e}from"./u-search.5a7a3cc0.js";import{d as t,z as a,L as s,M as l,A as i,N as o,o as n,c as u,w as r,E as d,h as c,s as f,x as h,O as v,k as p,P as b,Q as m,b as g,m as y,R as x,G as _,T as w,r as k,a as C,e as S,f as T,g as F,l as O,t as z,F as I,U as j,V as X,W as $,i as B}from"./index.26a6cf84.js";import{_ as Y}from"./plugin-vue_export-helper.21dcd24c.js";import{_ as N}from"./u-badge.f4477090.js";import{g as R}from"./util.871c1879.js";import{_ as W}from"./tabbar.c02ed954.js";import{_ as H}from"./news-card.bf9d4267.js";import{_ as M}from"./z-paging.dba6931f.js";import{g as V,a as U}from"./news.3e6b7eb5.js";import"./u-icon.7191c6e8.js";import"./u-image.e15c05f6.js";import"./icon_visit.9ad00ab7.js";var E=Y(t({__name:"tab",props:{dot:{type:[Boolean,String],default:!1},name:{type:[Boolean,String],default:""},info:null},setup(e){const t=e,b=a(!1),m=a(!1),g=a(!1),y=a(void 0),x=s("updateTabs"),_=s("handleChange"),w=()=>{x&&x()},k=v();console.log(k),_(null==k?void 0:k.props,(e=>{y.value=y.value||e,b.value=e,g.value=y.value,m.value=e})),l((()=>{w()}));const C=i((()=>{const{dot:e,info:a}=t;return{dot:e,info:a}}));return o((()=>C.value),(()=>{w()})),o((()=>t.name),(e=>{w()})),(e,t)=>{const a=p;return n(),u(a,{class:f({active:b.value,inactive:!b.value,tab:!0}),style:h(m.value?"":"display: none;")},{default:r((()=>[g.value?d(e.$slots,"default",{key:0},void 0,!0):c("v-if",!0)])),_:3},8,["class","style"])}}}),[["__scopeId","data-v-9df85c86"]]);var G=Y({name:"u-sticky",emits:["fixed","unfixed"],props:{offsetTop:{type:[Number,String],default:0},index:{type:[Number,String],default:""},enable:{type:Boolean,default:!0},h5NavHeight:{type:[Number,String],default:44},bgColor:{type:String,default:"#ffffff"},zIndex:{type:[Number,String],default:""}},data(){return{fixed:!1,height:"auto",stickyTop:0,elClass:this.$u.guid(),left:0,width:"auto"}},watch:{offsetTop(e){this.initObserver()},enable(e){0==e?(this.fixed=!1,this.disconnectObserver("contentObserver")):this.initObserver()}},computed:{uZIndex(){return this.zIndex?this.zIndex:this.$u.zIndex.sticky}},mounted(){this.initObserver()},methods:{initObserver(){this.enable&&(this.stickyTop=0!=this.offsetTop?b(this.offsetTop)+this.h5NavHeight:this.h5NavHeight,this.disconnectObserver("contentObserver"),this.$uGetRect("."+this.elClass).then((e=>{this.height=e.height,this.left=e.left,this.width=e.width,this.$nextTick((()=>{this.observeContent()}))})))},observeContent(){this.disconnectObserver("contentObserver");const e=m(this,{thresholds:[.95,.98,1]});e.relativeToViewport({top:-this.stickyTop}),e.observe("."+this.elClass,(e=>{this.enable&&this.setFixed(e.boundingClientRect.top)})),this.contentObserver=e},setFixed(e){const t=e<this.stickyTop;t?this.$emit("fixed",this.index):this.fixed&&this.$emit("unfixed",this.index),this.fixed=t},disconnectObserver(e){const t=this[e];t&&t.disconnect()}},beforeUnmount(){this.disconnectObserver("contentObserver")}},[["render",function(e,t,a,s,l,i){const o=p;return n(),u(o,{class:""},{default:r((()=>[g(o,{class:f(["u-sticky-wrap",[l.elClass]]),style:h({height:l.fixed?l.height+"px":"auto",backgroundColor:a.bgColor})},{default:r((()=>[g(o,{class:"u-sticky",style:h({position:l.fixed?"fixed":"static",top:l.stickyTop+"px",left:l.left+"px",width:"auto"==l.width?"auto":l.width+"px",zIndex:i.uZIndex})},{default:r((()=>[d(e.$slots,"default",{},void 0,!0)])),_:3},8,["style"])])),_:3},8,["class","style"])])),_:3})}],["__scopeId","data-v-d82ef4b0"]]);var Q=Y(t({__name:"tabs",props:{isScroll:{type:Boolean,default:!0},current:{default:0},height:{default:80},fontSize:{default:28},duration:{default:.3},activeColor:{default:"#2073F4"},inactiveColor:{default:"#333"},barWidth:{default:40},barHeight:{default:4},gutter:{default:30},bgColor:{default:"#FFFFFF"},name:{default:"name"},count:{default:"count"},offset:{default:[5,20]},bold:{type:Boolean,default:!0},activeItemStyle:{default:{}},showBar:{type:Boolean,default:!0},barStyle:{default:{}},itemWidth:{default:"auto"},isFixed:{type:Boolean,default:!1},top:{default:0},stickyBgColor:{default:"#FFFFFF"},swipeable:{type:Boolean,default