| 1 |
- import{f as J,F as Z}from"./index-285664a9.js";import{c as M,s as U,d as v,r as S,Z as L,a2 as G,a3 as H,a4 as Q,w as O,k as Y,a5 as ee,h as e,I as x,a6 as V,a7 as D,z as W,a8 as te,i as ne,q as z,a9 as K,m as F,t as ce,aa as se,ab as T,p as ae,ac as oe,M as ie,D as le,F as j}from"./index-0145b3d0.js";const[re,g]=M("notice-bar"),ue={text:String,mode:String,color:String,delay:U(1),speed:U(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var he=v({name:re,props:ue,emits:["close","replay"],setup(t,{emit:o,slots:n}){let a=0,i=0,u;const m=S(),_=S(),l=L({show:!0,offset:0,duration:0}),b=()=>{if(n["left-icon"])return n["left-icon"]();if(t.leftIcon)return e(x,{class:g("left-icon"),name:t.leftIcon},null)},I=()=>{if(t.mode==="closeable")return"cross";if(t.mode==="link")return"arrow"},w=r=>{t.mode==="closeable"&&(l.show=!1,o("close",r))},B=()=>{if(n["right-icon"])return n["right-icon"]();const r=I();if(r)return e(x,{name:r,class:g("right-icon"),onClick:w},null)},R=()=>{l.offset=a,l.duration=0,te(()=>{D(()=>{l.offset=-i,l.duration=(i+a)/+t.speed,o("replay")})})},C=()=>{const r=t.scrollable===!1&&!t.wrapable,f={transform:l.offset?`translateX(${l.offset}px)`:"",transitionDuration:`${l.duration}s`};return e("div",{ref:m,role:"marquee",class:g("wrap")},[e("div",{ref:_,style:f,class:[g("content"),{"van-ellipsis":r}],onTransitionend:R},[n.default?n.default():t.text])])},h=()=>{const{delay:r,speed:f,scrollable:d}=t,A=ne(r)?+r*1e3:0;a=0,i=0,l.offset=0,l.duration=0,clearTimeout(u),u=setTimeout(()=>{if(!m.value||!_.value||d===!1)return;const k=V(m).width,s=V(_).width;(d||s>k)&&D(()=>{a=k,i=s,l.offset=-i,l.duration=i/+f})},A)};return G(h),H(h),Q("pageshow",h),W({reset:h}),O(()=>[t.text,t.scrollable],h),()=>{const{color:r,wrapable:f,background:d}=t;return Y(e("div",{role:"alert",class:g({wrapable:f}),style:{color:r,background:d}},[b(),C(),B()]),[[ee,l.show]])}}});const fe=z(he),[de,p,me]=M("search"),_e=K({},J,{label:String,shape:F("square"),leftIcon:F("search"),clearable:ce,actionText:String,background:String,showAction:Boolean});var ge=v({name:de,props:_e,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(t,{emit:o,slots:n,attrs:a}){const i=se(),u=S(),m=()=>{n.action||(o("update:modelValue",""),o("cancel"))},_=s=>{s.keyCode===13&&(oe(s),o("search",t.modelValue))},l=()=>t.id||`${i}-input`,b=()=>{if(n.label||t.label)return e("label",{class:p("label"),for:l()},[n.label?n.label():t.label])},I=()=>{if(t.showAction){const s=t.actionText||me("cancel");return e("div",{class:p("action"),role:"button",tabindex:0,onClick:m},[n.action?n.action():s])}},w=()=>{var s;return(s=u.value)==null?void 0:s.blur()},B=()=>{var s;return(s=u.value)==null?void 0:s.focus()},R=s=>o("blur",s),C=s=>o("focus",s),h=s=>o("clear",s),r=s=>o("clickInput",s),f=s=>o("clickLeftIcon",s),d=s=>o("clickRightIcon",s),A=Object.keys(J),k=()=>{const s=K({},a,T(t,A),{id:l()}),N=X=>o("update:modelValue",X);return e(Z,ae({ref:u,type:"search",class:p("field"),border:!1,onBlur:R,onFocus:C,onClear:h,onKeypress:_,onClickInput:r,onClickLeftIcon:f,onClickRightIcon:d,"onUpdate:modelValue":N},s),T(n,["left-icon","right-icon"]))};return W({focus:B,blur:w}),()=>{var s;return e("div",{class:p({"show-action":t.showAction}),style:{background:t.background}},[(s=n.left)==null?void 0:s.call(n),e("div",{class:p("content",t.shape)},[b(),k()]),I()])}}});const pe=z(ge),ke="_back_kfhh6_1",ye="_container_kfhh6_16",ve="_content_kfhh6_22",be="_opacityBg_kfhh6_27",Ie="_leftContent_kfhh6_32",we="_leftBg_kfhh6_37",Be="_types_kfhh6_47",Re="_type_kfhh6_47",Ce="_typeActive_kfhh6_65",Ae="_typeImg_kfhh6_65",Se="_typeIndex_kfhh6_70",xe="_typeIcon_kfhh6_97",Le="_center_kfhh6_103",Ne="_musicContent_kfhh6_115",Ue="_musicItem_kfhh6_126",Ve="_disableNotic_kfhh6_145",De="_musicActive_kfhh6_149",Fe="_displayIcon_kfhh6_1",Te="_musicAvtor_kfhh6_159",je="_musicInfo_kfhh6_168",qe="_musicName_kfhh6_171",Ee="_noticeBar_kfhh6_177",Pe="_musicDes_kfhh6_181",$e="_musicFavitor_kfhh6_186",Je="_musicAuthor_kfhh6_198",Me="_musicIcon_kfhh6_206",Oe="_right_kfhh6_210",We="_staff_kfhh6_226",ze="_rightBtns_kfhh6_229",Ke="_scaleBtn_kfhh6_1",c={back:ke,container:ye,content:ve,opacityBg:be,leftContent:Ie,leftBg:we,types:Be,type:Re,typeActive:Ce,typeImg:Ae,typeIndex:Se,typeIcon:xe,center:Le,musicContent:Ne,musicItem:Ue,disableNotic:Ve,musicActive:De,displayIcon:Fe,musicAvtor:Te,musicInfo:je,musicName:qe,noticeBar:Ee,musicDes:Pe,musicFavitor:$e,musicAuthor:Je,musicIcon:Me,right:Oe,"right-musicName":"_right-musicName_kfhh6_218",staff:We,rightBtns:ze,scaleBtn:Ke},Xe="_white_1oqt0_25",Ze="_transparent_1oqt0_28",Ge="_searchBtn_1oqt0_40",y={"m-search":"_m-search_1oqt0_1",default:"_default_1oqt0_22",white:Xe,transparent:Ze,searchBtn:Ge},He=""+new URL("icon-search-d43eb2c3.svg",import.meta.url).href,Qe=v({name:"m-search",props:{modelValue:{type:String,default:""},shape:{type:String,default:"round"},disabled:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},placeholder:{type:String,default:"请输入搜索关键词"},background:{type:String,default:"#fff"},inputBackground:{type:String,default:"default"}},emits:["search"],setup(t,{slots:o,emit:n}){const a=L({search:t.modelValue||""});return O(()=>t.modelValue,()=>{a.search=t.modelValue}),()=>e(pe,{class:[y["m-search"],y[t.inputBackground]],shape:t.shape,background:t.background,placeholder:t.placeholder,disabled:t.disabled,autofocus:t.autofocus,autocomplete:"off",modelValue:a.search,"onUpdate:modelValue":i=>a.search=i,clearTrigger:"always",onClear:()=>{console.log("clear"),a.search="",n("search",a.search)},onSearch:()=>n("search",a.search)},{left:()=>o.left&&o.left(),"left-icon":()=>e(x,{name:He,class:y.leftIcon},null),"right-icon":()=>e(ie,{disabled:t.disabled,class:y.searchBtn,round:!0,type:"primary",size:"mini",onClick:()=>n("search",a.search)},{default:()=>[le("搜索")]})})}}),Ye=""+new URL("icon_play-eeef8244.svg",import.meta.url).href,et=""+new URL("icon_back-b80c2fc2.svg",import.meta.url).href,tt=""+new URL("icon_down-27184904.svg",import.meta.url).href,nt=""+new URL("icon_jianpu-80bd16a8.svg",import.meta.url).href,ct=""+new URL("icon_jianpuActive-17580202.svg",import.meta.url).href,st=""+new URL("icon_start-4add1f07.svg",import.meta.url).href,at=""+new URL("1-0aed42a1.svg",import.meta.url).href,ot=""+new URL("2-f51bb566.svg",import.meta.url).href,it=""+new URL("3-9fe2956a.svg",import.meta.url).href,q=""+new URL("1-068d7272.png",import.meta.url).href,E=""+new URL("2-be3ea30a.png",import.meta.url).href,P=""+new URL("3-6a1b17fd.png",import.meta.url).href,$=""+new URL("4-70426869.png",import.meta.url).href,ut=v({name:"co-ai",setup(){const t=[at,ot,it],o=[{name:"竖笛-上学歌",auther:"人教版",hot:232,img:q},{name:"最伟大的作品",auther:"周杰伦",hot:132,img:E},{name:"夏天的风",auther:"温岚",hot:112,img:P},{name:"慢生活",auther:"李萌",hot:112,img:$},{name:"竖笛-上学歌",auther:"人教版",hot:232,img:q},{name:"最伟大的作品",auther:"周杰伦",hot:132,img:E},{name:"夏天的风",auther:"温岚",hot:112,img:P},{name:"慢生活",auther:"李萌",hot:112,img:$}],n=L({typeIndex:0,musicIndex:0,isShowJianpu:!1});return()=>e("div",{class:c.container},[e("div",{class:c.back},[e("img",{src:et},null)]),e("div",{class:c.content},[e("div",{class:[c.opacityBg,c.leftContent]},[e("div",{class:c.leftBg},null),e("div",{class:c.types},[new Array(10).fill(1).map((a,i)=>{const u=t[i]?t[i]:t[i%3];return e("div",{class:[c.type,n.typeIndex===i&&c.typeActive],onClick:()=>n.typeIndex=i},[e("div",{class:c.typeIndex},null),e("div",{class:c.typeImg},[e("img",{class:c.typeIcon,src:u},null)])])})]),e("div",{class:c.center},[e(Qe,{shape:"round",background:"transparent",placeholder:"请输入曲目名称"},null),e("div",{class:c.musicContent},[o.map((a,i)=>e("div",{class:[c.musicItem,n.musicIndex===i?c.musicActive:c.disableNotic],onClick:()=>n.musicIndex=i},[e("img",{class:c.musicAvtor,src:a.img},null),e("div",{class:c.musicInfo},[e("div",{class:c.musicName},[e(fe,{text:a.name,color:"#333",class:c.noticeBar,background:"none"},null)]),e("div",{class:c.musicDes},[e("div",{class:c.musicFavitor},[a.hot]),e("div",{class:[c.musicAuthor,"van-ellipsis"]},[a.auther])])]),e("img",{class:[c.musicIcon],src:Ye},null)]))])])]),e("div",{class:[c.opacityBg,c.right]},[e("div",{class:c["right-musicName"]},[o[n.musicIndex].name]),n.isShowJianpu?e(j,null,[e("img",{style:{display:n.musicIndex%2===0?"":"none"},class:c.staff,src:"https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet-first/1687673062603-1.png"},null),e("img",{style:{display:n.musicIndex%2!==0?"":"none"},class:c.staff,src:"https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet-first/1675232855321-1.png"},null)]):e(j,null,[e("img",{style:{display:n.musicIndex%2===0?"":"none"},class:c.staff,src:"https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet/1687673062488-1.png"},null),e("img",{style:{display:n.musicIndex%2!==0?"":"none"},class:c.staff,src:"https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet/1675232854483-2.png"},null)]),e("div",{class:c.rightBtns},[e("img",{src:n.isShowJianpu?ct:nt,onClick:()=>n.isShowJianpu=!n.isShowJianpu},null),e("img",{src:tt},null),e("img",{src:st},null)])])])])}});export{ut as default};
|