index-legacy-a0dad6c1.js 5.6 KB

1
  1. System.register(["./index-legacy-65951573.js","./index-legacy-6c770b5c.js","./api-legacy-920dd57e.js","./index-legacy-e074e412.js"],(function(t,e){"use strict";var i,a,n,o,s,d,r,l,_,m,c,g,u,b,v;return{setters:[t=>{i=t.T},t=>{a=t.d,n=t.u,o=t.e,s=t.n,d=t.f,r=t.v,l=t.F,_=t.j,m=t.A,c=t.y,g=t.b3},t=>{u=t.a,b=t.b},t=>{v=t.T}],execute:function(){var h=document.createElement("style");h.textContent='._container_m7b7q_1{display:flex;flex-direction:column;background:#FFFFFF;border-radius:1.04166667vw}._tools_m7b7q_7{padding:1.66666667vw 1.66666667vw 1.04166667vw;display:flex;align-items:flex-start;flex-shrink:0}._tools_m7b7q_7 .n-input{margin-left:auto;width:18.75vw}._tools_m7b7q_7 .n-button.n-button--disabled{cursor:initial;padding:0}._tools_m7b7q_7 ._tagWrap_m7b7q_21{flex:1;margin-right:1.04166667vw}._tools_m7b7q_7 ._tags_m7b7q_25{padding:.625vw 0}._tools_m7b7q_7 ._tags_m7b7q_25 ._firstButton_m7b7q_28{display:flex;align-items:center;justify-content:center;height:100%;font-size:.9375rem;color:#999;line-height:1.30208333vw}._tools_m7b7q_7 ._tags_m7b7q_25 .n-button{min-width:5.3125vw;height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem}._content_m7b7q_43{flex:1;padding:1.04166667vw 1.875vw 1.875vw}._item_m7b7q_47{position:relative;width:11.14583333vw;cursor:pointer;transition:all .3s}._item_m7b7q_47 ._cover_m7b7q_53{position:relative;overflow:hidden}._item_m7b7q_47 ._cover_m7b7q_53:before{content:"";position:absolute;top:5.57291667vw;left:0;width:11.14583333vw;height:11.14583333vw;background:#DDF2FF;border-radius:50%}._item_m7b7q_47:hover{transform:scale(1.1)}._item_m7b7q_47 ._itemImg_m7b7q_70{position:relative;width:8.22916667vw;height:11.61458333vw;margin:auto;background-color:#edeff2;background-image:url('+new URL("icon_default-486fe3d3.svg",e.meta.url).href+');background-repeat:no-repeat;background-position:center center}._item_m7b7q_47 ._itemImg_m7b7q_70:before{content:"";position:absolute;top:.20833333vw;right:-.20833333vw;width:.20833333vw;height:calc(100% - .41666667vw);background-color:#c5c5c5;z-index:1}._item_m7b7q_47 ._itemImg_m7b7q_70:after{content:"";position:absolute;top:.10416667vw;right:-.10416667vw;width:.20833333vw;height:calc(100% - .20833333vw);background-color:#e7e7e7;z-index:2}._item_m7b7q_47 ._itemImg_m7b7q_70 ._itemBg_m7b7q_100{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_m7b7q_47 ._itemImg_m7b7q_70 .n-image{position:relative;width:100%;height:100%;z-index:3}._item_m7b7q_47 ._itemImg_m7b7q_70 img{transition:opacity .3s;opacity:0}._item_m7b7q_47 ._itemImg_m7b7q_70 img[data-loaded=true]{opacity:1}._item_m7b7q_47 ._itemName_m7b7q_125{margin-top:.83333333vw;font-size:.83333333rem;font-weight:500;color:#333;text-align:center}\n',document.head.appendChild(h);const p="_container_m7b7q_1",w="_tools_m7b7q_7",q="_tagWrap_m7b7q_21",f="_tags_m7b7q_25",y="_firstButton_m7b7q_28",I="_content_m7b7q_43",x="_item_m7b7q_47",k="_cover_m7b7q_53",C="_itemImg_m7b7q_70",A="_itemBg_m7b7q_100",z="_itemName_m7b7q_125";t("default",a({name:"XiaokuAi",setup(){const t=n(),e=o({musicTagIds:[],enable:!0,keyword:"",page:1,rows:9999}),a=o({tags:[],tagChildren:[],tagActiveId:"",tagActive:{},list:[],loading:!1}),h=async()=>{a.loading=!0;const t=await b({...e,musicTagIds:[a.tagActiveId,...e.musicTagIds].filter(Boolean)});Array.isArray(t?.data?.rows)&&(a.list=t.data.rows),a.loading=!1},T=(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&&T(a,e)};return s((async()=>{await(async()=>{const t=await u();if(Array.isArray(t?.data)&&t.data.length){a.tags=t.data,a.tagActiveId=t.data[0].id;const e=[];T(t.data[0].children,e),a.tagChildren=e}})(),h()})),()=>{let n;return d("div",{class:p},[d("div",{class:w},[d("div",{class:q},[d("div",{class:f},[d(r,{size:[20,12]},{default:()=>[d("span",{class:y},[a.tags?.[0]?.columnName]),a.tags.map(((t,i)=>d(l,null,[d(_,{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=[];T(a.tags[i].children,n),a.tagChildren=n,h()})(t,i)},{default:()=>[t.name]})])))]})]),a.tagChildren.map(((t,i)=>d("div",{class:f},[d(r,{size:[24,12]},{default:()=>[d("span",{class:y},[t.columnName]),t.list.map(((n,o)=>d(l,null,[d(_,{round:!0,secondary:t.activeIndex!==o,type:t.activeIndex===o?"primary":"default",onClick:()=>((t,i)=>{const n=a.tagChildren[t].list[a.tagChildren[t].activeIndex],o=a.tagChildren[t].list[i];n&&n.id!==o.id&&(e.musicTagIds=e.musicTagIds.filter((t=>t!==n.id))),e.musicTagIds.includes(o.id)?(e.musicTagIds=e.musicTagIds.filter((t=>t!==o.id)),a.tagChildren[t].activeIndex=-1):(e.musicTagIds.push(o.id),a.tagChildren[t].activeIndex=i),h()})(i,o)},{default:()=>[n.name]})])))]})])))]),d(i,{round:!0,onSearch:t=>{e.keyword=t,h()}},null)]),d(m,{show:a.loading},{default:()=>{return[d("div",{class:I},[a.list.length>0?d(r,{size:[50,40]},(e=n=a.list.map(((e,i)=>d("div",{class:x,key:`item-${i}`,onClick:()=>t.push({path:"/xiaoku-music",query:{id:e.id,name:e.name}})},[d("div",{class:k},[d("div",{class:C},[d("div",{class:A},null),d(c,{objectFit:"cover",src:e.coverImg,lazy:!0,previewDisabled:!0,onLoad:t=>{t.target.dataset.loaded="true"}},null)])]),d("div",{class:z},[e.name])]))),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!g(e)?n:{default:()=>[n]})):d(v,null,null)])];var e}})])}}}))}}}));