1 |
- import{d as p,aV as d,ag as l,r as g,Z as m,$ as u,c as t,L as h,m as y,f as v}from"./index.ffe80dbe.js";import{s as c,g as f}from"./index.module.c5e86b95.js";import{I as b}from"./index.7e972106.js";var w=p({name:"accompany",setup(x,I){const s=d(),n=l(),e=g({childPath:"",svgs:[],musicTreeActive:""}),i=async()=>{try{const a=await y.get(v.platformApi+"/musicSheetCategories/queryTree?enable=true");Array.isArray(a==null?void 0:a.data)&&(e.svgs=a.data.map((o,A)=>({...o,id:o.id,icon:o.coverImg,btnIcon:f("b2.svg"),color:"#9881FF",title:o.name,subtitle:"",btnText:"GO >"})),console.log("\u{1F680} ~ data.svgs",e.svgs))}catch(a){console.log(a)}r()},r=()=>{const a=(s==null?void 0:s.path)||"accompany";e.childPath=a.replace(/\//g,"")||"accompany",console.log("\u{1F680} ~ route.path",e.childPath)};return m(()=>s.path,()=>{r()}),u(()=>{i()}),()=>t("div",{class:c.accompany},[t("div",{class:c.accompanyCategory},[e.svgs.map(a=>t("div",{class:c.container,onClick:()=>{n.push({path:"/musicList",query:{categorieid:a.id}})}},[t(b,{src:a.icon,width:"100%",height:"100%"},{loading:()=>t(h,{type:"spinner",size:"20"},null)})]))])])}});export{w as default};
|