1 |
- import{f as M,F as X}from"./index-7f0a9c49.js";import{c as O,s as U,d as v,r as x,Z as L,a2 as Z,a3 as Q,a4 as Y,w as W,k as ee,a5 as te,h as e,I as S,a6 as V,a7 as T,z,a8 as ce,i as ne,q as K,a9 as G,m as D,t as se,aa as ae,ab as F,p as oe,ac as ie,M as le,D as re,F as j,S as q}from"./index-0cd3d098.js";const[ue,g]=O("notice-bar"),de={text:String,mode:String,color:String,delay:U(1),speed:U(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null}};var me=v({name:ue,props:de,emits:["close","replay"],setup(t,{emit:a,slots:c}){let o=0,d=0,r;const l=x(),m=x(),i=L({show:!0,offset:0,duration:0}),b=()=>{if(c["left-icon"])return c["left-icon"]();if(t.leftIcon)return e(S,{class:g("left-icon"),name:t.leftIcon},null)},I=()=>{if(t.mode==="closeable")return"cross";if(t.mode==="link")return"arrow"},k=u=>{t.mode==="closeable"&&(i.show=!1,a("close",u))},B=()=>{if(c["right-icon"])return c["right-icon"]();const u=I();if(u)return e(S,{name:u,class:g("right-icon"),onClick:k},null)},C=()=>{i.offset=o,i.duration=0,ce(()=>{T(()=>{i.offset=-d,i.duration=(d+o)/+t.speed,a("replay")})})},R=()=>{const u=t.scrollable===!1&&!t.wrapable,f={transform:i.offset?`translateX(${i.offset}px)`:"",transitionDuration:`${i.duration}s`};return e("div",{ref:l,role:"marquee",class:g("wrap")},[e("div",{ref:m,style:f,class:[g("content"),{"van-ellipsis":u}],onTransitionend:C},[c.default?c.default():t.text])])},h=()=>{const{delay:u,speed:f,scrollable:_}=t,A=ne(u)?+u*1e3:0;o=0,d=0,i.offset=0,i.duration=0,clearTimeout(r),r=setTimeout(()=>{if(!l.value||!m.value||_===!1)return;const w=V(l).width,s=V(m).width;(_||s>w)&&T(()=>{o=w,d=s,i.offset=-d,i.duration=d/+f})},A)};return Z(h),Q(h),Y("pageshow",h),z({reset:h}),W(()=>[t.text,t.scrollable],h),()=>{const{color:u,wrapable:f,background:_}=t;return ee(e("div",{role:"alert",class:g({wrapable:f}),style:{color:u,background:_}},[b(),R(),B()]),[[te,i.show]])}}});const he=K(me),[fe,p,_e]=O("search"),ge=G({},M,{label:String,shape:D("square"),leftIcon:D("search"),clearable:se,actionText:String,background:String,showAction:Boolean});var pe=v({name:fe,props:ge,emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(t,{emit:a,slots:c,attrs:o}){const d=ae(),r=x(),l=()=>{c.action||(a("update:modelValue",""),a("cancel"))},m=s=>{s.keyCode===13&&(ie(s),a("search",t.modelValue))},i=()=>t.id||`${d}-input`,b=()=>{if(c.label||t.label)return e("label",{class:p("label"),for:i()},[c.label?c.label():t.label])},I=()=>{if(t.showAction){const s=t.actionText||_e("cancel");return e("div",{class:p("action"),role:"button",tabindex:0,onClick:l},[c.action?c.action():s])}},k=()=>{var s;return(s=r.value)==null?void 0:s.blur()},B=()=>{var s;return(s=r.value)==null?void 0:s.focus()},C=s=>a("blur",s),R=s=>a("focus",s),h=s=>a("clear",s),u=s=>a("clickInput",s),f=s=>a("clickLeftIcon",s),_=s=>a("clickRightIcon",s),A=Object.keys(M),w=()=>{const s=G({},o,F(t,A),{id:i()}),N=H=>a("update:modelValue",H);return e(X,oe({ref:r,type:"search",class:p("field"),border:!1,onBlur:C,onFocus:R,onClear:h,onKeypress:m,onClickInput:u,onClickLeftIcon:f,onClickRightIcon:_,"onUpdate:modelValue":N},s),F(c,["left-icon","right-icon"]))};return z({focus:B,blur:k}),()=>{var s;return e("div",{class:p({"show-action":t.showAction}),style:{background:t.background}},[(s=c.left)==null?void 0:s.call(c),e("div",{class:p("content",t.shape)},[b(),w()]),I()])}}});const we=K(pe),ye="_back_1h4cw_1",ve="_container_1h4cw_16",be="_content_1h4cw_22",Ie="_opacityBg_1h4cw_27",ke="_leftContent_1h4cw_32",Be="_leftBg_1h4cw_37",Ce="_leftBg2_1h4cw_48",Re="_types_1h4cw_58",Ae="_type_1h4cw_58",xe="_typeActive_1h4cw_78",Se="_typeImg_1h4cw_78",Le="_scaleBtn_1h4cw_1",Ne="_typeIndex_1h4cw_84",Ue="_typeIcon_1h4cw_111",Ve="_center_1h4cw_117",Te="_musicContent_1h4cw_130",De="_musicItem_1h4cw_142",Fe="_disableNotic_1h4cw_161",je="_musicActive_1h4cw_165",qe="_displayIcon_1h4cw_1",Ee="_musicAvtor_1h4cw_175",Pe="_musicInfo_1h4cw_184",$e="_musicName_1h4cw_187",Je="_noticeBar_1h4cw_193",Me="_musicDes_1h4cw_197",Oe="_musicFavitor_1h4cw_202",We="_musicAuthor_1h4cw_214",ze="_musicIcon_1h4cw_222",Ke="_right_1h4cw_226",Ge="_staff_1h4cw_241",He="_rightBtns_1h4cw_244",n={back:ye,container:ve,content:be,opacityBg:Ie,leftContent:ke,leftBg:Be,leftBg2:Ce,types:Re,type:Ae,typeActive:xe,typeImg:Se,scaleBtn:Le,typeIndex:Ne,typeIcon:Ue,center:Ve,musicContent:Te,musicItem:De,disableNotic:Fe,musicActive:je,displayIcon:qe,musicAvtor:Ee,musicInfo:Pe,musicName:$e,noticeBar:Je,musicDes:Me,musicFavitor:Oe,musicAuthor:We,musicIcon:ze,right:Ke,"right-musicName":"_right-musicName_1h4cw_233",staff:Ge,rightBtns:He},Xe="_white_1oqt0_25",Ze="_transparent_1oqt0_28",Qe="_searchBtn_1oqt0_40",y={"m-search":"_m-search_1oqt0_1",default:"_default_1oqt0_22",white:Xe,transparent:Ze,searchBtn:Qe},Ye=""+new URL("icon-search-d43eb2c3.svg",import.meta.url).href,et=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:a,emit:c}){const o=L({search:t.modelValue||""});return W(()=>t.modelValue,()=>{o.search=t.modelValue}),()=>e(we,{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:o.search,"onUpdate:modelValue":d=>o.search=d,clearTrigger:"always",onClear:()=>{console.log("clear"),o.search="",c("search",o.search)},onSearch:()=>c("search",o.search)},{left:()=>a.left&&a.left(),"left-icon":()=>e(S,{name:Ye,class:y.leftIcon},null),"right-icon":()=>e(le,{disabled:t.disabled,class:y.searchBtn,round:!0,type:"primary",size:"mini",onClick:()=>c("search",o.search)},{default:()=>[re("搜索")]})})}}),tt=""+new URL("icon_play-eeef8244.svg",import.meta.url).href,ct=""+new URL("icon_back-b80c2fc2.svg",import.meta.url).href,nt=""+new URL("icon_down-27184904.svg",import.meta.url).href,st=""+new URL("icon_jianpu-80bd16a8.svg",import.meta.url).href,at=""+new URL("icon_jianpuActive-17580202.svg",import.meta.url).href,ot=""+new URL("icon_start-4add1f07.svg",import.meta.url).href,it=""+new URL("1-0aed42a1.svg",import.meta.url).href,lt=""+new URL("2-f51bb566.svg",import.meta.url).href,rt=""+new URL("3-9fe2956a.svg",import.meta.url).href,E=""+new URL("1-068d7272.png",import.meta.url).href,P=""+new URL("2-be3ea30a.png",import.meta.url).href,$=""+new URL("3-6a1b17fd.png",import.meta.url).href,J=""+new URL("4-70426869.png",import.meta.url).href,mt=v({name:"co-ai",setup(){const t=[it,lt,rt],a=[{name:"竖笛-上学歌",auther:"人教版",hot:232,img:E},{name:"最伟大的作品",auther:"周杰伦",hot:132,img:P},{name:"夏天的风",auther:"温岚",hot:112,img:$},{name:"慢生活",auther:"李萌",hot:112,img:J},{name:"竖笛-上学歌",auther:"人教版",hot:232,img:E},{name:"最伟大的作品",auther:"周杰伦",hot:132,img:P},{name:"夏天的风",auther:"温岚",hot:112,img:$},{name:"慢生活",auther:"李萌",hot:112,img:J}],c=L({typeIndex:0,musicIndex:0,isShowJianpu:!1}),o=()=>{q({api:"goBack"})},d=()=>{q({api:"openAccompanyWebView",content:{url:"https://dev.kt.colexiu.com/instrument?id=43539&Authorization=bearer 529d1359-20c6-4ea2-b2ba-2694cdeda8a4",orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})};return()=>e("div",{class:n.container},[e("div",{class:n.back,onClick:o},[e("img",{src:ct},null)]),e("div",{class:n.content},[e("div",{class:[n.leftContent]},[e("div",{class:n.leftBg2},null),e("div",{class:n.leftBg},null),e("div",{class:n.types},[new Array(10).fill(1).map((r,l)=>{const m=t[l]?t[l]:t[l%3];return e("div",{class:[n.type,c.typeIndex===l&&n.typeActive],onClick:()=>c.typeIndex=l},[e("div",{class:n.typeIndex},null),e("div",{class:n.typeImg},[e("img",{class:n.typeIcon,src:m},null)])])})]),e("div",{class:n.center},[e(et,{shape:"round",background:"transparent",placeholder:"请输入曲目名称"},null),e("div",{class:n.musicContent},[a.map((r,l)=>e("div",{class:[n.musicItem,c.musicIndex===l?n.musicActive:n.disableNotic],onClick:()=>c.musicIndex=l},[e("img",{class:n.musicAvtor,src:r.img},null),e("div",{class:n.musicInfo},[e("div",{class:n.musicName},[e(he,{text:r.name,color:"#333",class:n.noticeBar,background:"none"},null)]),e("div",{class:n.musicDes},[e("div",{class:n.musicFavitor},[r.hot]),e("div",{class:[n.musicAuthor,"van-ellipsis"]},[r.auther])])]),e("img",{class:[n.musicIcon],src:tt},null)]))])])]),e("div",{class:[n.opacityBg,n.right]},[e("div",{class:n["right-musicName"]},[a[c.musicIndex].name]),c.isShowJianpu?e(j,null,[e("img",{style:{display:c.musicIndex%2===0?"":"none"},class:n.staff,src:"https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet-first/1687673062603-1.png"},null),e("img",{style:{display:c.musicIndex%2!==0?"":"none"},class:n.staff,src:"https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet-first/1675232855321-1.png"},null)]):e(j,null,[e("img",{style:{display:c.musicIndex%2===0?"":"none"},class:n.staff,src:"https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet/1687673062488-1.png"},null),e("img",{style:{display:c.musicIndex%2!==0?"":"none"},class:n.staff,src:"https://cloud-coach.ks3-cn-beijing.ksyuncs.com/music-sheet/1675232854483-2.png"},null)]),e("div",{class:n.rightBtns},[e("img",{src:c.isShowJianpu?at:st,onClick:()=>c.isShowJianpu=!c.isShowJianpu},null),e("img",{src:nt},null),e("img",{src:ot,onClick:()=>d()},null)])])])])}});export{mt as default};
|