header-legacy.951cecf1.js 5.7 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.f8641610.js","./index-legacy.4ddb0119.js","./index-legacy.28050159.js","./index-legacy.00d337cc.js","./index-legacy.a8de4840.js","./index-legacy.e8dcdcc8.js","./index-legacy.a9cc406e.js","./index-legacy.6e10cd37.js","./select-tag-legacy.b1189321.js","./music-legacy.1c924052.js","./select-subject-legacy.484824c5.js","./hooks-legacy.1d4168e3.js"],(function(e){"use strict";var n,o,t,a,r,c,l,i,s,d,u,_,f,g,m,v,h,b,y,p,k,w,j,x,S,C;return{setters:[function(e){n=e.d,o=e.s,t=e.U,a=e.Q,r=e.P,c=e.bD,l=e.a3,i=e.V,s=e.S,d=e.i,u=e.N,_=e.R,f=e.aT,g=e.$},function(e){m=e.S},function(e){v=e.T},function(){},function(e){h=e.T,b=e.a},function(e){y=e.C},function(e){p=e.c},function(e){k=e.c},function(e){w=e.S},function(e){j=e.g},function(e){x=e.S},function(e){S=e.a,C=e.S}],execute:function(){var O=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 z,H=e("m",{all:z=z||new Map,on:function(e,n){var o=z.get(e);o?o.push(n):z.set(e,[n])},off:function(e,n){var o=z.get(e);o&&(n?o.splice(o.indexOf(n)>>>0,1):z.set(e,[]))},emit:function(e,n){var o=z.get(e);o&&o.slice().map((function(e){e(n)})),(o=z.get("*"))&&o.slice().map((function(o){o(e,n)}))}}),T=t(),E=n({name:"MusicSearchHeader",setup:function(){if(!S(C.SEARCH).id){var e=o.user.data,n=e.subjectId?Number(e.subjectId.split(",")[0]):"",z=e.subjectName?e.subjectName.split(",")[0]:"";n&&S(C.SEARCH,JSON.stringify({id:n,name:z}),"set")}var E=t();localStorage.setItem("behaviorId",j());var N=a(),R=r(),A=t(""),M=t(""),I=t(!1),K=p("music-search",[]),P=t("songe");c((function(){var e=S(C.SEARCH);if(D.name=e.name||"全部声部",D.id=e.id,"/music-songbook/search"===R.path){A.value="",M.value="",P.value="songe";try{var n,o;null===(n=T.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){A.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(",");M.value=n,H.emit("confirm",e),I.value=!1},V=function(e){D.name=e.name,D.id=e.id,S(C.SEARCH,JSON.stringify({id:e.id,name:e.name}),"set"),H.emit("confirmSubject",D),D.show=!1};i((function(){}));var B=S(C.SEARCH),D=s({show:!1,name:B.name||"全部声部",id:B.id||""});return function(){return d("div",{class:O.search},[d(m,{class:O.sticky},{default:function(){return[d(y,{modelValue:A.value,ref:E,onSearch:U,onClick:function(){"/music-songbook"===R.path&&N.push({path:"/music-songbook/search"})}},{left:function(){return d("div",{class:O.label,onClick:function(){return D.show=!0}},[D.name,d(u,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}}),"/music-songbook/search"===R.path&&d(h,{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"===R.path&&d("div",{class:k(O.keywords,"van-hairline--bottom")},[d("div",{class:O.content},[K.value.map((function(e){return d(v,{round:!0,class:O.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(u,{class:O.remove,name:"delete-o",onClick:function(){return K.value=[]}},null)]),d(_,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(w,{ref:T,onConfirm:J,onCancel:function(){}},null)]}}),d(f,{show:D.show,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:function(){return D.show=!1},onClosed:function(){return D.show=!1}},{default:function(){return[d(x,{searchParams:D,onComfirm:V},null)]}})])}}}),N=Object.freeze(Object.defineProperty({__proto__:null,mitter:H,default:E},Symbol.toStringTag,{value:"Module"}));e("h",N)}}}))}();