header-legacy.c11a5491.js 5.5 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML="._search_ngdof_1{--van-cell-background-color: transparent;--van-cell-font-size: .42667rem;--van-cell-text-color: #333;--van-cell-value-color: #999;--van-cell-icon-size: .26667rem;--base-bg: #f6f8f9}._search_ngdof_1 ._sticky_ngdof_9 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._search_ngdof_1 ._sticky_ngdof_9>div{background-color:var(--base-bg)}._search_ngdof_1 ._title_ngdof_15{padding-top:.42667rem}._search_ngdof_1 ._title_ngdof_15 .van-cell__value{font-size:.32rem}._search_ngdof_1 ._keywords_ngdof_21{margin-top:.26667rem;padding:0 .37333rem .26667rem;display:flex;align-items:center}._search_ngdof_1 ._keywords_ngdof_21 ._content_ngdof_28::-webkit-scrollbar{display:none}._search_ngdof_1 ._keywords_ngdof_21 ._content_ngdof_28{flex:1;overflow:hidden;overflow-x:auto;display:flex}._search_ngdof_1 ._keywords_ngdof_21 ._content_ngdof_28 ._searchKeyword_ngdof_38{--van-tag-default-color: white;--van-tag-text-color: #333;font-size:.37333rem;padding:.10667rem .26667rem;margin-right:.13333rem;word-break:keep-all}._search_ngdof_1 ._keywords_ngdof_21 ._remove_ngdof_46{font-size:.42667rem}._search_ngdof_1 ._label_ngdof_49{margin-right:.21333rem;font-size:.37333rem}._search_ngdof_1 ._label_ngdof_49 .van-list__loading,._search_ngdof_1 ._label_ngdof_49 .van-list__finished-text,._search_ngdof_1 ._label_ngdof_49 .van-list__error-text{width:100%}._search_ngdof_1 ._label_ngdof_49 .iconfont-down{margin-left:.10667rem}\n",document.head.appendChild(e),System.register(["./index-legacy.fba2875c.js","./index-legacy.edb65d0c.js","./index-legacy.78361179.js","./index-legacy.af00a324.js","./index-legacy.5aeab789.js","./mitt-legacy.d2fe1d8d.js","./index-legacy.fc679d65.js","./index-legacy.33680739.js","./index-legacy.6e10cd37.js","./select-tag-legacy.467b7514.js","./music-legacy.4cbbd879.js","./select-subject-legacy.38c54f06.js","./hooks-legacy.148eb332.js"],(function(e){"use strict";var n,o,t,a,r,c,l,i,s,d,_,u,f,g,m,h,v,b,y,p,k,w,j,x,S,C,O;return{setters:[function(e){n=e.d,o=e.g,t=e.S,a=e.P,r=e.O,c=e.bD,l=e.a2,i=e.U,s=e.Q,d=e.j,_=e.M,u=e.R,f=e.aR,g=e.Z},function(e){m=e.S},function(e){h=e.T},function(){},function(e){v=e.T,b=e.a},function(e){y=e.m},function(e){p=e.S},function(e){k=e.c},function(e){w=e.c},function(e){j=e.S},function(e){x=e.g},function(e){S=e.S},function(e){C=e.a,O=e.S}],execute:function(){var z=e("s",{search:"_search_ngdof_1",sticky:"_sticky_ngdof_9",title:"_title_ngdof_15",keywords:"_keywords_ngdof_21",content:"_content_ngdof_28",searchKeyword:"_searchKeyword_ngdof_38",remove:"_remove_ngdof_46",label:"_label_ngdof_49"});var H=e("m",y()),R=t(),E=n({name:"MusicSearchHeader",setup:function(){if(!C(O.SEARCH).id){var e=o.user.data,n=e.subjectId?Number(e.subjectId.split(",")[0]):"",y=e.subjectName?e.subjectName.split(",")[0]:"";n&&C(O.SEARCH,JSON.stringify({id:n,name:y}),"set")}var E=t();localStorage.setItem("behaviorId",x());var T=a(),A=r(),M=t(""),N=t(""),I=t(!1),K=k("music-search",[]),P=t("songe");c((function(){var e=C(O.SEARCH);if(L.name=e.name||"全部声部",L.id=e.id,"/music-songbook/search"===A.path){M.value="",N.value="",P.value="songe";try{var n,o;null===(n=R.value)||void 0===n||null===(o=n.resetTags)||void 0===o||o.call(n)}catch(t){console.log(t)}}return!0})),l(P,(function(e){H.emit("changeTab",e)}));var U=function(e){M.value=e;var n=K.value.indexOf(e);n>-1&&K.value.splice(n,1),e&&(K.value.unshift(e),K.value.length=Math.min(K.value.length,5)),H.emit("search",e)},J=function(e){var n=Object.values(e).flat().filter(Boolean).join(",");N.value=n,H.emit("confirm",e),I.value=!1},B=function(e){L.name=e.name,L.id=e.id,C(O.SEARCH,JSON.stringify({id:e.id,name:e.name}),"set"),H.emit("confirmSubject",L),L.show=!1};i((function(){}));var D=C(O.SEARCH),L=s({show:!1,name:D.name||"全部声部",id:D.id||""});return function(){return d("div",{class:z.search},[d(m,{class:z.sticky},{default:function(){return[d(p,{modelValue:M.value,ref:E,onSearch:U,onClick:function(){"/music-songbook"===A.path&&T.push({path:"/music-songbook/search"})}},{left:function(){return d("div",{class:z.label,onClick:function(){return L.show=!0}},[L.name,d(_,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}}),"/music-songbook/search"===A.path&&d(v,{color:"var(--van-primary)",background:"transparent",lineWidth:20,shrink:!0,active:P.value,"onUpdate:active":function(e){return P.value=e},onChange:function(e){return P.value=e}},{default:function(){return[d(b,{title:"单曲",name:"songe"},null),d(b,{title:"专辑",name:"album"},null)]}})]}}),K.value.length>0&&"/music-songbook/search"===A.path&&d("div",{class:w(z.keywords,"van-hairline--bottom")},[d("div",{class:z.content},[K.value.map((function(e){return d(h,{round:!0,class:z.searchKeyword,key:e,onClick:function(){return U(e)}},"function"==typeof(n=e)||"[object Object]"===Object.prototype.toString.call(n)&&!g(n)?e:{default:function(){return[e]}});var n}))]),d(_,{class:z.remove,name:"delete-o",onClick:function(){return K.value=[]}},null)]),d(u,null,null),d(f,{show:I.value,round:!0,closeable:!0,position:"bottom",style:{height:"60%"},teleport:"body","onUpdate:show":function(e){return I.value=e}},{default:function(){return[d(j,{ref:R,onConfirm:J,onCancel:function(){}},null)]}}),d(f,{show:L.show,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:function(){return L.show=!1},onClosed:function(){return L.show=!1}},{default:function(){return[d(S,{searchParams:L,onComfirm:B},null)]}})])}}}),T=Object.freeze(Object.defineProperty({__proto__:null,mitter:H,default:E},Symbol.toStringTag,{value:"Module"}));e("h",T)}}}))}();