1 |
- import{t as d,a as D}from"./moreArrow.9485fe74.js";import{r as T}from"./index.6fc5f983.js";import{d as k,r as v,g as _,u as S,o as F,c as a,a as i,a1 as U,F as x}from"./vendor.63aa8b19.js";const W="_wrap_12rhr_1",P="_wrapLeft_12rhr_9",y="_hotIcon_12rhr_14",G="_tagWrap_12rhr_19",b="_wrapRight_12rhr_29",Z="_arrow_12rhr_39",O="_searchWrap_12rhr_44",z="_search_12rhr_44",J="_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:P,hotIcon:y,tagWrap:G,wrapRight:b,arrow:Z,searchWrap:O,search:z,searchDetail:J,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==",le=k({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 e=v({hotList:[],type:o.type,showDetail:!0,tagTree:[],chioseTagList:[],chioseParentList:[],searchTagList:[],searchType:o.searchType,searchHover:!1}),w=_(),A=S(),f=async()=>{try{const s=await T.get(`/api-website/open/music/sheet/hotTag/${e.searchType}`);e.hotList=s.data}catch(s){console.log(s)}},B=async()=>{try{const s=await T.get("/api-website/open/MusicTag/tree",{});if(e.tagTree=s.data,e.tagTree.push({id:-1,name:"\u4E50\u8C31\u7C7B\u578B",children:[{id:-1,name:"\u5168\u90E8",parentTagId:-1,isCheck:!0},{id:-2,name:"\u7CBE\u54C1",parentTagId:-1}]}),e.chioseParentList.push(-1),e.chioseTagList.push(-1),e.searchTagList=[],e.tagTree.forEach(r=>{r.children.forEach(c=>{e.chioseTagList.indexOf(c.id)!=-1&&e.searchTagList.push(c)})}),A.params.tag&&A.params.parentTagId){const r=I(A.params.tag);r&&(e.showDetail=!1,n(r))}}catch(s){console.log(s)}},n=s=>{const r=e.chioseParentList.indexOf(s.parentTagId),c=e.chioseTagList.indexOf(s.id);if(r!==-1&&c!==-1){s.isCheck=!1,e.chioseParentList.splice(r,1),e.chioseTagList.splice(c,1),l();return}if(c==-1&&r==-1){e.chioseParentList.push(s.parentTagId),e.chioseTagList.push(s.id),s.isCheck=!0,l();return}if(c!==-1||r!==-1){e.tagTree.forEach(h=>{h.id==s.parentTagId&&h.children.forEach(u=>{u.isCheck=!1;let p=e.chioseTagList.indexOf(u.id);p!==-1&&e.chioseTagList.splice(p,1)})}),s.isCheck=!0,e.chioseTagList.push(s.id),l();return}},l=()=>{e.searchTagList=[],e.tagTree.forEach(s=>{s.children.forEach(r=>{e.chioseTagList.indexOf(r.id)!=-1&&e.searchTagList.push(r)})}),m()},L=s=>{n(s)},C=()=>{e.chioseTagList=[],e.chioseParentList=[],e.searchTagList=[],e.tagTree.forEach(s=>{s.children.forEach(r=>{r.isCheck=!1})})},m=()=>{g.emit("searchRust",e.chioseTagList)},E=s=>{o.isChiose&&(e.hotList.forEach(r=>{r.isCheck=!1}),e.hotList.forEach(r=>{r.key==s&&(r.isCheck=!0)})),g.emit("hotTag",s)},R=()=>{w.push({path:o.gotoPath})},I=s=>{let r=null;return e.tagTree.forEach(c=>{c.children.forEach(h=>{s==h.id&&(r=h)})}),r};return F(()=>{f(),B()}),()=>a(x,null,[e.showDetail?a("div",{class:t.wrap},[a("div",{class:t.wrapLeft},[a("h5",null,[i("\u70ED\u95E8\u641C\u7D22\uFF1A")]),a("div",{class:t.tagWrap},[e.hotList.map(s=>(console.log(s.isCheck,"isCheck"),a(d,{isSmall:!0,title:s.key,onSearchTag:r=>E(r),isChiose:!0,item:s},{default:()=>[s.key]})))])]),e.type=="more"?a("div",{class:t.wrapRight,onClick:R},[a("span",null,[i("\u66F4\u591A")]),a("img",{class:t.arrow,src:D,alt:""},null)]):null,e.type=="search"?a("div",{class:[t.wrapRight,t.searchWrap],onClick:()=>e.showDetail=!1,onMouseover:()=>{e.searchHover=!0},onMouseout:()=>{e.searchHover=!1}},[a("span",null,[i("\u7B5B\u9009")]),a("img",{class:t.search,src:e.searchHover?ce:te,alt:""},null)]):null]):a("div",{class:t.searchDetail},[a("div",{class:t.searchResult},[a("div",{class:t.resultTitle},[a("span",null,[i("\u5DF2\u9009\u7C7B\u578B\uFF1A")])]),a("div",{class:t.tagList},[e.searchTagList.map(s=>a(U,{size:"large",closable:!0,onClose:()=>L(s),class:"chioseTag"},{default:()=>[s.name]}))]),a("div",{class:t.searchResultRight},[a("div",{class:t.clearBtn,onClick:C},[a("span",{class:t.clearText},[i("\u6E05\u7A7A")]),a("img",{src:he,class:t.clearIcon,alt:""},null)]),a("div",{class:t.clearBtn,onClick:()=>{e.showDetail=!0}},[a("span",null,[i("\u6536\u8D77")]),a("img",{src:ie,class:t.clearIcon,alt:""},null)])])]),a("div",{class:t.searchChioseWrap},[a("div",{class:t.chioseLineWrap},[e.tagTree.map(s=>a("div",{class:t.chioseRow},[a("p",null,[s.name,i("\uFF1A")]),a("div",{class:[t.chioseTagWrap,"chioseTagWrap"]},[s.children.map(r=>a("div",{class:[t.tags,r.isCheck?t.check:""],onClick:()=>{n(r)}},[r.name]))])]))])])])])}});export{le as h};
|