1 |
- import{T as p}from"./index.4beeb08e.js";import{T as h,r as d}from"./request.d02ea4a1.js";import{d as m,r as n,G as f,c as a,Y as w,W as _}from"./index.0dfb9898.js";import{S,a as y}from"./index.a73e0153.js";const M="_hotMusic_olatt_1",v="_title_olatt_4",b="_swipeItem_olatt_7",r={hotMusic:M,title:v,swipeItem:b};function g(t,o=4){if(t.length<=0||o<=0)return t;let i=[];for(let s=0;s<t.length;s=s+o)i.push(t.slice(s,s+o));return i}function I(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!w(t)}const H=m({name:"HotMusic",setup(){const t=_(),o=n([]),i=async()=>{try{const{data:e}=await d.post("/api-website/open/music/sheet/list",{data:{albumStatus:"PASS",page:1,rows:12,state:1}});e&&Array.isArray(e.rows)&&(o.value=g(e.rows,4))}catch{}};f(()=>{i(),l()});const s=n(312),c=n(!1),l=()=>{c.value=!1;const e=document.body.clientWidth>750?750:document.body.clientWidth;s.value=e-63,c.value=!0};return()=>{let e;return a("div",{class:r.hotMusic},[a(h,{class:r.title,title:"\u70ED\u95E8\u66F2\u76EE",onMore:()=>t.push("/search")},null),c.value&&a(S,{showIndicators:!1,loop:!1,width:s.value},I(e=o.value.map(u=>a(y,{class:r.swipeItem},{default:()=>[a(p,{list:u},null)]})))?e:{default:()=>[e]})])}}});export{H};
|