1 |
- import{t as d,a as I}from"./moreArrow.6320b000.js";import{r as w}from"./index.1f84bfe1.js";import{d as v,r as _,f as k,u as S,o as F,c as a,a as c,T as U,F as x}from"./vendor.9f3c6e4d.js";const W="_wrap_12rhr_1",b="_wrapLeft_12rhr_9",y="_hotIcon_12rhr_14",G="_tagWrap_12rhr_19",P="_wrapRight_12rhr_29",Z="_arrow_12rhr_39",z="_searchWrap_12rhr_44",J="_search_12rhr_44",O="_searchDetail_12rhr_72",Y="_searchResult_12rhr_72",K="_resultTitle_12rhr_79",Q="_tagList_12rhr_87",M="_searchResultRight_12rhr_114",N="_clearBtn_12rhr_118",V="_clearText_12rhr_139",H="_clearIcon_12rhr_142",q="_searchChioseWrap_12rhr_147",j="_chioseLineWrap_12rhr_152",X="_chioseRow_12rhr_157",$="_chioseTagWrap_12rhr_186",ee="_tags_12rhr_193",se="_check_12rhr_212",ae="_tagText_12rhr_217",re="_submitBtn_12rhr_225";var t={wrap:W,wrapLeft:b,hotIcon:y,tagWrap:G,wrapRight:P,arrow:Z,searchWrap:z,search:J,searchDetail:O,searchResult:Y,resultTitle:K,tagList:Q,searchResultRight:M,clearBtn:N,clearText:V,clearIcon:H,searchChioseWrap:q,chioseLineWrap:j,chioseRow:X,chioseTagWrap:$,"el-tag":"_el-tag_12rhr_93",tags:ee,check:se,tagText:ae,submitBtn:re},te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAApNJREFUWEftl0uIjWEYx39/RBKJ3Cm5321ZSbk0pLGwUyyUcskQJSbKYBBJyrWxkWysjJIkJCmh3EVZjJU0C4zbhkfP9By9c+abmTM637HxLp/vfO//9/2fy/semVlPYAewCRhCZdYH4BhwSGa2E9hfGd12KrUO8B4Y9o8AmhygGRgcAEeAEznDbAZqQqPZARqANREwYKOkk3lAmNlW4DCg2L/BAYYCD4ExCcQGSafKCWFm24GDyZ6PgAWtJGY2HrgNjE4g1ks6XQ6IjEJ/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hDLhRRinXLoGkiKphcNKgoxRZUKFioDabN5ZGzJiTXfEoIDnnH5+P/e5//+77HEdq8qM08dIAtd/z/tlR6qexlDZNg7Abhtto/HAARN2NDwxPui07tMAnacwDbCgBmDqay6VF4A7lGoQ0BpWhwKwuWZwDt2SDMeLScXTk9573wqxFoXeCu+OTmbnRFwDhQTZCASFaz+N+7/cv1oDWBOyP3rJusPU8BeMqEGFkQLIbYq2w2N/DBe3axFrQ6MBIw2a19UwCOGQRmNDPGxBymwbAbcmmiVV/ScW6hhhsVUsxke6HcJ6bzpVkiRM2mbt/rg4MZe3J6CzKZJ2A4DApzOVrzpR0jHytBK05oj4fHwXzF0JAUrWbPm/3HlwpxKRHs4Yz1IYAjhtrvecF09G3/iYQRugFoj4WvA3zDUPhJE+F+d0j+ZhToSyld4k88AGPIcKZLgoDBhEPWn1JxlQGlmHKJie6CuRhnxlfS1tzq4ZHPVS+DoohSLyYYGDXUZAAaUp3DM4V4UViKh07mGQqBhGIT8w+APKpLVutddz0vxcO3mPlqWS1hlRjDSaf8WI8XgfZY6AtAvSWzr3Be86VcZ2YbgRVqbLPhayTgZqlLABZUp/xHuwSozJd8tvRd+ZMuWX+DTS9bLDRGoDsAxPVmnledp7YbgOEBgCf0TRBwuWBB07S/DfoRMdP4+lB0sXCOdT9t/wqs1tcBttrRzl9byx1tv6W/AYPIyR1H9tHeAAAAAElFTkSuQmCC",he="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAG9JREFUSEtjZKAzYKSzfQyjFlI9xEeDdDRISQ6BEZRo/lsbejL8Z5jJwMAgS3I44dfwmIGRIZ3x6PntIGXwIP1vZfiIBpbBnPKY8dh5uQG2kN5BSuV4w2ncCMoWo0FKrRAYTTTUCkm4OaNBSvUgBQDGzhgd9CnBmQAAAABJRU5ErkJggg==",ne=v({name:"hotSearch",components:{tagItem:d},emits:["searchRust","hotTag"],props:{type:{type:String,default:"more"},searchType:{type:String,default:"MUSIC"},gotoPath:{type:String,default:"/searchdetail"},isChiose:{type:Boolean,default:!1}},setup(o,g){const s=_({hotList:[],type:o.type,showDetail:!0,tagTree:[],chioseTagList:[],chioseParentList:[],searchTagList:[],searchType:o.searchType,searchHover:!1}),B=k(),A=S(),f=async()=>{try{const e=await w.get(`/api-website/open/music/sheet/hotTag/${s.searchType}`);s.hotList=e.data}catch(e){console.log(e)}},T=async()=>{try{const e=await w.get("/api-website/open/MusicTag/tree",{});if(s.tagTree=e.data,A.params.tag&&A.params.parentTagId){let r=D(A.params.tag);r&&(s.showDetail=!1,l(r))}}catch(e){console.log(e)}},l=e=>{let r=s.chioseParentList.indexOf(e.parentTagId),i=s.chioseTagList.indexOf(e.id);if(r!==-1&&i!==-1){e.isCheck=!1,s.chioseParentList.splice(r,1),s.chioseTagList.splice(i,1),n();return}if(i==-1&&r==-1){s.chioseParentList.push(e.parentTagId),s.chioseTagList.push(e.id),e.isCheck=!0,n();return}if(i!==-1||r!==-1){s.tagTree.forEach(h=>{h.id==e.parentTagId&&h.children.forEach(u=>{u.isCheck=!1;let p=s.chioseTagList.indexOf(u.id);p!==-1&&s.chioseTagList.splice(p,1)})}),e.isCheck=!0,s.chioseTagList.push(e.id),n();return}},n=()=>{s.searchTagList=[],s.tagTree.forEach(e=>{e.children.forEach(r=>{s.chioseTagList.indexOf(r.id)!=-1&&s.searchTagList.push(r)})}),m()},L=e=>{l(e)},C=()=>{s.chioseTagList=[],s.chioseParentList=[],s.searchTagList=[],s.tagTree.forEach(e=>{e.children.forEach(r=>{r.isCheck=!1})})},m=()=>{g.emit("searchRust",s.chioseTagList)},R=e=>{o.isChiose&&(s.hotList.forEach(r=>{r.isCheck=!1}),s.hotList.forEach(r=>{r.key==e&&(r.isCheck=!0)})),g.emit("hotTag",e)},E=()=>{B.push({path:o.gotoPath})},D=e=>{let r=null;return s.tagTree.forEach(i=>{i.children.forEach(h=>{e==h.id&&(r=h)})}),r};return F(()=>{f(),T()}),()=>a(x,null,[s.showDetail?a("div",{class:t.wrap},[a("div",{class:t.wrapLeft},[a("h5",null,[c("\u70ED\u95E8\u641C\u7D22\uFF1A")]),a("div",{class:t.tagWrap},[s.hotList.map(e=>a(d,{isSmall:!0,title:e.key,onSearchTag:r=>R(r),isChiose:!0,item:e},{default:()=>[e.key]}))])]),s.type=="more"?a("div",{class:t.wrapRight,onClick:E},[a("span",null,[c("\u66F4\u591A")]),a("img",{class:t.arrow,src:I,alt:""},null)]):null,s.type=="search"?a("div",{class:[t.wrapRight,t.searchWrap],onClick:()=>s.showDetail=!1,onMouseover:()=>{s.searchHover=!0},onMouseout:()=>{s.searchHover=!1}},[a("span",null,[c("\u7B5B\u9009")]),a("img",{class:t.search,src:s.searchHover?ce:te,alt:""},null)]):null]):a("div",{class:t.searchDetail},[a("div",{class:t.searchResult},[a("div",{class:t.resultTitle},[a("span",null,[c("\u5DF2\u9009\u7C7B\u578B\uFF1A")])]),a("div",{class:t.tagList},[s.searchTagList.map(e=>a(U,{size:"large",closable:!0,onClose:()=>L(e),class:"chioseTag"},{default:()=>[e.name]}))]),a("div",{class:t.searchResultRight},[a("div",{class:t.clearBtn,onClick:C},[a("span",{class:t.clearText},[c("\u6E05\u7A7A")]),a("img",{src:he,class:t.clearIcon,alt:""},null)]),a("div",{class:t.clearBtn,onClick:()=>{s.showDetail=!0}},[a("span",null,[c("\u6536\u8D77")]),a("img",{src:ie,class:t.clearIcon,alt:""},null)])])]),a("div",{class:t.searchChioseWrap},[a("div",{class:t.chioseLineWrap},[s.tagTree.map(e=>a("div",{class:t.chioseRow},[a("p",null,[e.name,c("\uFF1A")]),a("div",{class:[t.chioseTagWrap,"chioseTagWrap"]},[e.children.map(r=>a("div",{class:[t.tags,r.isCheck?t.check:""],onClick:()=>{l(r)}},[" ",r.name]))])]))])])])])}});export{ne as h};
|