1 |
- System.register(["./index-legacy-d0eedf52.js","./index-legacy-e6915333.js","./api-legacy-8337633c.js","./index-legacy-4b97f804.js"],(function(t,e){"use strict";var i,a,n,c,o,d,s,l,r,_,m,h,g,w,u;return{setters:[t=>{i=t.T},t=>{a=t.d,n=t.u,c=t.e,o=t.n,d=t.f,s=t.v,l=t.F,r=t.j,_=t.A,m=t.y,h=t.b4},t=>{g=t.a,w=t.b},t=>{u=t.T}],execute:function(){var v=document.createElement("style");v.textContent='._container_hcm5w_1{display:flex;flex-direction:column;background:#FFFFFF;border-radius:1.04166667vw;min-height:100%}._tools_hcm5w_8{padding:1.66666667vw 1.66666667vw 1.04166667vw;display:flex;align-items:flex-start;flex-shrink:0}._tools_hcm5w_8 .n-input{margin-left:auto;width:18.75vw}._tools_hcm5w_8 .n-input__input-el{height:100%;line-height:100%}._tools_hcm5w_8 .n-button.n-button--disabled{cursor:initial;padding:0}._tools_hcm5w_8 ._tagWrap_hcm5w_26{flex:1;margin-right:1.04166667vw}._tools_hcm5w_8 ._tags_hcm5w_30{padding:.625vw 0}._tools_hcm5w_8 ._tags_hcm5w_30 ._firstButton_hcm5w_33{display:flex;align-items:center;justify-content:center;height:100%;font-size:.9375rem;color:#999;line-height:1.30208333vw}._tools_hcm5w_8 ._tags_hcm5w_30 .n-button{min-width:5.3125vw;height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem}._content_hcm5w_48{flex:1;padding:1.04166667vw 1.875vw 1.875vw}._content_hcm5w_48._loadingContent_hcm5w_52{min-height:50vh}._item_hcm5w_55{position:relative;width:11.14583333vw;cursor:pointer;transition:all .3s}._item_hcm5w_55 ._cover_hcm5w_61{position:relative;overflow:hidden}._item_hcm5w_55 ._cover_hcm5w_61:before{content:"";position:absolute;top:5.57291667vw;left:0;width:11.14583333vw;height:11.14583333vw;background:#DDF2FF;border-radius:50%}._item_hcm5w_55:hover{transform:scale(1.1)}._item_hcm5w_55 ._itemImg_hcm5w_78{position:relative;width:8.22916667vw;height:11.61458333vw;margin:auto;background-color:#edeff2;background-image:url('+new URL("icon_default-495cec59.svg",e.meta.url).href+');background-repeat:no-repeat;background-position:center center}._item_hcm5w_55 ._itemImg_hcm5w_78:before{content:"";position:absolute;top:.20833333vw;right:-.20833333vw;width:.20833333vw;height:calc(100% - .41666667vw);background-color:#c5c5c5;z-index:1}._item_hcm5w_55 ._itemImg_hcm5w_78:after{content:"";position:absolute;top:.10416667vw;right:-.10416667vw;width:.20833333vw;height:calc(100% - .20833333vw);background-color:#e7e7e7;z-index:2}._item_hcm5w_55 ._itemImg_hcm5w_78 ._itemBg_hcm5w_108{position:absolute;top:0;left:0;width:100%;height:100%;z-index:4;background-repeat:no-repeat;background-image:linear-gradient(to right,rgba(0,0,0,.2) 0,rgba(255,255,255,.08) 0%,transparent .5%),linear-gradient(to right,rgba(0,0,0,.1) .3%,rgba(255,255,255,.09) 1.1%,transparent 1.3%);background-size:50% 100%,50% 100%;background-position:0% top,9% top}._item_hcm5w_55 ._itemImg_hcm5w_78 .n-image{position:relative;width:100%;height:100%;z-index:3}._item_hcm5w_55 ._itemImg_hcm5w_78 img{transition:opacity .3s;opacity:0}._item_hcm5w_55 ._itemImg_hcm5w_78 img[data-loaded=true]{opacity:1}._item_hcm5w_55 ._itemName_hcm5w_133{margin-top:.83333333vw;font-size:.83333333rem;font-weight:500;color:#333;text-align:center}\n',document.head.appendChild(v);const p="_container_hcm5w_1",f="_tools_hcm5w_8",b="_tagWrap_hcm5w_26",y="_tags_hcm5w_30",I="_firstButton_hcm5w_33",x="_content_hcm5w_48",k="_loadingContent_hcm5w_52",C="_item_hcm5w_55",z="_cover_hcm5w_61",A="_itemImg_hcm5w_78",T="_itemBg_hcm5w_108",F="_itemName_hcm5w_133";t("default",a({name:"XiaokuAi",setup(){const t=n(),e=c({musicTagIds:[],enable:!0,keyword:"",page:1,rows:9999}),a=c({tags:[],tagChildren:[],tagActiveId:"",tagActive:{},list:[],loading:!1}),v=async()=>{a.loading=!0;try{const t=await w({...e,musicTagIds:[a.tagActiveId,...e.musicTagIds].filter(Boolean)});Array.isArray(t?.data?.rows)&&(a.list=t.data.rows)}catch{}a.loading=!1},j=(t,e)=>{if(!t?.length)return;const i={columnName:t[0].columnName,list:[]},a=[];for(let n=0;n<t.length;n++)i.list.push({name:t[n].name,id:t[n].id,activeIndex:-1}),t[n].children&&a.push(...t[n].children);e.push(i),a.length&&j(a,e)};return o((async()=>{a.loading=!0;try{await(async()=>{const t=await g();if(Array.isArray(t?.data)&&t.data.length){a.tags=t.data,a.tagActiveId=t.data[0].id;const e=[];j(t.data[0].children,e),a.tagChildren=e}})(),await v()}catch{}a.loading=!1})),()=>{let n;return d("div",{class:p},[d("div",{class:f},[d("div",{class:b},[d("div",{class:y},[d(s,{size:[20,12]},{default:()=>[d("span",{class:I},[a.tags?.[0]?.columnName]),a.tags.map(((t,i)=>d(l,null,[d(r,{round:!0,secondary:a.tagActiveId!==t.id,type:a.tagActiveId===t.id?"primary":"default",onClick:()=>((t,i)=>{a.tagActiveId=t.id,e.musicTagIds=[];const n=[];j(a.tags[i].children,n),a.tagChildren=n,v()})(t,i)},{default:()=>[t.name]})])))]})]),a.tagChildren.map(((t,i)=>d("div",{class:y},[d(s,{size:[24,12]},{default:()=>[d("span",{class:I},[t.columnName]),t.list.map(((n,c)=>d(l,null,[d(r,{round:!0,secondary:t.activeIndex!==c,type:t.activeIndex===c?"primary":"default",onClick:()=>((t,i)=>{const n=a.tagChildren[t].list[a.tagChildren[t].activeIndex],c=a.tagChildren[t].list[i];n&&n.id!==c.id&&(e.musicTagIds=e.musicTagIds.filter((t=>t!==n.id))),e.musicTagIds.includes(c.id)?(e.musicTagIds=e.musicTagIds.filter((t=>t!==c.id)),a.tagChildren[t].activeIndex=-1):(e.musicTagIds.push(c.id),a.tagChildren[t].activeIndex=i),v()})(i,c)},{default:()=>[n.name]})])))]})])))]),d(i,{round:!0,onSearch:t=>{e.keyword=t,v()}},null)]),d(_,{show:a.loading},{default:()=>{return[d("div",{class:[x,a.loading?k:""]},[a.list.length>0?d(s,{size:[50,40]},(e=n=a.list.map(((e,i)=>d("div",{class:C,key:`item-${i}`,onClick:()=>t.push({path:"/xiaoku-music",query:{id:e.id,name:e.name}})},[d("div",{class:z},[d("div",{class:A},[d("div",{class:T},null),d(m,{objectFit:"cover",src:e.coverImg,lazy:!0,previewDisabled:!0,onLoad:t=>{t.target.dataset.loaded="true"}},null)])]),d("div",{class:F},[e.name])]))),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!h(e)?n:{default:()=>[n]})):"",!a.loading&&a.list.length<=0&&d(u,null,null)])];var e}})])}}}))}}}));
|