import{N as T,u as x,am as B,l as h,B as w,aC as F,S as f,y as N,dN as P,aW as A,Q as E,m as K,R as m,o as n,ak as i,W as p,a as l,c as V,Z as D,V as y,a3 as L,a0 as W,Y as I,bB as M,as as j,j as q,x as G}from"./index.2e2ba873.js";import{k as Q}from"./App.4a38a252.js";import{u as U,a as Y}from"./index.f1458219.js";import"./MoreFeedback.7a64cae1.js";import"./plugin-vue_export-helper.21dcd24c.js";import"./style.488e5a30.js";import"./btn_devtools.210a42a8.js";import"./index.53c6cc19.js";import"./modulepreload-polyfill.b7f2da20.js";import"./ico_max_exit.795e9ef8.js";import"./index.36d4c5c3.js";import"./isUdf.1a76b9f4.js";import"./ico_pin.548219aa.js";/* empty css               */import"./theme-map.83df99de.js";const Z={class:"i_wrapper p_relative"},$={class:"home_hots--tabs flex_start ps p_absolute"},z=l("span",{class:"gamepad-cursor","data-tp":"liveUps"},null,-1),J={class:"home_hots--content h_100 w_100"},ve=T({__name:"HomeHots",setup(O){const u=x(),k=B(),r=[{key:"1",label:"\u7EFC\u5408\u70ED\u95E8",route:"HomeHotsAll",meta:{loadmore:!0}},{key:"2",label:"\u6BCF\u5468\u5FC5\u770B",route:"HomeHotsSeries"},{key:"3",label:"\u5165\u7AD9\u5FC5\u5237",route:"HomeHotsPrecious",meta:{loadmore:!0}},{key:"4",label:"\u6392\u884C\u699C",route:"HomeHotsRanking"}],o=h(r[0].key),_=w(()=>r.find(e=>e.key===o.value));U({spm_id:f.homeHot,pageName:"HomeHot"}),F("pageSpmId",f.homeHot);const{resetScroller:H}=Q(".home_hots");Y(".home_hots");const d=h(),{homeHotsRef:b}=N(P()),g=A(),C=()=>g.flashPageCursors(),v=e=>{const t=r.find(a=>a.key===e);if(t){if(u.name===t.route)return;k.push({name:t.route})}},S=()=>{var e;(e=_.value.meta)!=null&&e.loadmore&&q.emit("loadmore",_.value.route)};return E(o,e=>{v(e)}),K(async()=>{var a;u.path.startsWith("/page/home/hots")&&(H(),v(o.value),b.value=d.value),await G();const e=(a=u.query)==null?void 0:a.key,t=r.some(c=>c.key===e);e&&t&&(o.value=e)}),(e,t)=>{const a=m("v-button"),c=m("router-view"),R=m("Scroller");return n(),i(R,{ref_key:"homeHotsRef",ref:d,class:"home_hots page_scroller pt_lg h_100 p_relative u_select_none",onLoadMore:S,onScroll:C},{default:p(()=>[l("div",Z,[l("div",$,[(n(),V(I,null,D(r,s=>y(a,{class:"mr_sm p_relative","active-pink":"",key:s.key,type:"tab",active:o.value===s.key,onClick:X=>o.value=s.key},{default:p(()=>[L(W(s.label)+" ",1),z]),_:2},1032,["active","onClick"])),64))]),l("div",J,[y(c,null,{default:p(({Component:s})=>[(n(),i(M,null,[(n(),i(j(s)))],1024))]),_:1})])])]),_:1},512)}}});export{ve as default};
