1 |
- import{d as I,o as c,h as E,w as h,j as s,u as l,T as O,U as T,b as R,t as N,a as u,r as v,_ as U,f as m,ag as W,au as M,s as q,ab as H,c as f,n as S,A as D,F as A,g as j,G as J,a5 as K,an as Q,am as X,ai as Y,a7 as Z,av as ee,aw as te,ah as L,aq as se,a4 as ae,B as oe,C as ne,ax as le,ay as V,ao as ue,a3 as ie,az as ce}from"./index.50a62b23.js";import{b as C,a as $,p as de,c as z}from"./right-fill-pano.vue_vue_type_style_index_0_scoped_23c3ecba_lang.045d6b31.js";import{R as _e}from"./right-fill-pano.22a9c1a8.js";const re={class:"info"},pe={class:"guide-cover"},ve=["src"],he={class:"actions"},me=I({__name:"sign",props:{guide:null},emits:["delete","play","edit"],setup(_,{emit:r}){const e=[{label:"\u7F16\u8F91",value:"edit"},{label:"\u5220\u9664",value:"delete"}],a={edit:()=>r("edit"),delete:()=>r("delete")};return(k,i)=>{const d=v("ui-icon"),F=v("ui-more"),w=v("ui-group-option");return c(),E(w,{class:"sign-guide"},{default:h(()=>[s("div",re,[s("div",pe,[s("img",{src:l(O)(l(T)(_.guide.cover))},null,8,ve),_.guide.paths.length?(c(),E(d,{key:0,type:"preview",class:"icon",ctrl:"",onClick:i[0]||(i[0]=g=>r("play"))})):R("",!0)]),s("div",null,[s("p",null,N(_.guide.title),1)])]),s("div",he,[u(F,{options:e,style:{"margin-left":"20px"},onClick:i[1]||(i[1]=g=>a[g]())})])]),_:1})}}});const fe=U(me,[["__scopeId","data-v-a73cac1d"]]),G=_=>(oe("data-v-ad325a61"),_=_(),ne(),_),ge={class:"video"},ye={class:"overflow"},be=D(" \u6DFB\u52A0\u89C6\u89D2 "),xe={key:0,class:"info"},ke={class:"meta"},we={class:"length"},Ce=G(()=>s("span",null,"\u89C6\u9891\u65F6\u957F",-1)),Fe=G(()=>s("span",null,"\u6E05\u7A7A\u753B\u9762",-1)),Pe=["onClick"],Be=["src"],Se={key:0,class:"set-phone-attr"},Ve=G(()=>s("span",null,"m/s",-1)),$e=G(()=>s("span",{class:"time"},"s",-1)),Ee={key:1,class:"un-video"},Ae=I({__name:"edit-paths",props:{data:null},setup(_){const e=m(_.data.paths),a=m(e.value[0]),k=(t,p)=>{const o=$.calcPathInfo(e.value.slice(t,t+2),p);Object.assign(e.value[t],o)};W(()=>K([Q.push(m(!1)),X.push(m(!1)),Y.push(m(!1)),Z.push(m(!1))])),M(e,{save(){}});const i=()=>{ee(async()=>{const t=await $.screenshot(260,160),o=await(await fetch(t)).blob(),P=$.getPose(),B=e.value.indexOf(a.value)+1,n=te({...P,cover:{url:t,blob:o}});if(e.value.splice(B,0,n),a.value=n,e.value.length>1){const b=e.value.length-2;k(b,{time:3})}})},d=async(t,p=!1)=>{if(p||await L.confirm("\u786E\u5B9A\u8981\u5220\u9664\u6B64\u753B\u9762\u5417\uFF1F")){const o=e.value.indexOf(t);~o&&e.value.splice(o,1),t===a.value&&(a.value=e.value[o+(o===0?0:-1)])}},F=async()=>{if(await L.confirm("\u786E\u5B9A\u8981\u6E05\u7A7A\u753B\u9762\u5417\uFF1F")){for(;e.value.length;)d(e.value[0],!0);a.value=e.value[0]}},w=t=>{$.comeTo({dur:300,...t}),a.value=t},g=async()=>{C.value?de():(w(e.value[0]),await se(400),z(ae(e.value),t=>{console.log("guide",t),a.value=e.value[t-1]}))},y=m();return q(async()=>{const t=e.value.indexOf(a.value);if(~t&&y.value){await H();const p=y.value.scrollWidth/e.value.length,o=y.value.offsetWidth/2,P=p*t-o;y.value.scroll({left:P,top:0})}}),(t,p)=>{const o=v("ui-icon"),P=v("ui-button"),B=v("ui-input");return c(),f("div",ge,[s("div",ye,[u(o,{ctrl:"",type:l(C)?"pause":"preview",disabled:!e.value.length,onClick:g},null,8,["type","disabled"]),u(P,{type:"primary",onClick:i,width:"200px",class:S({disabled:l(C)})},{default:h(()=>[be]),_:1},8,["class"])]),e.value.length?(c(),f("div",xe,[s("div",ke,[s("div",we,[Ce,D(N(e.value.reduce((n,b)=>n+b.time,0).toFixed(1))+"s ",1)]),s("div",{class:S(["fun-ctrl clear",{disabled:l(C)}]),onClick:F},[u(o,{type:"del"}),Fe],2)]),s("div",{class:"photo-list",ref_key:"listVm",ref:y},[(c(!0),f(A,null,j(e.value,(n,b)=>(c(),f(A,{key:n.id},[s("div",{class:S(["photo",{active:a.value===n,disabled:l(C)}]),onClick:x=>w(n)},[u(o,{type:"del",ctrl:"",onClick:J(x=>d(n),["stop"]),class:S({disabled:l(C)})},null,8,["onClick","class"]),s("img",{src:l(O)(l(T)(n.cover))},null,8,Be)],10,Pe),b!==e.value.length-1?(c(),f("div",Se,[u(B,{type:"number",width:"54px",height:"26px",modelValue:n.speed,"onUpdate:modelValue":x=>k(b,{speed:x}),ctrl:!1,min:.1,max:10},{icon:h(()=>[Ve]),_:2},1032,["modelValue","onUpdate:modelValue","min"]),u(B,{type:"number",width:"54px",height:"26px",modelValue:n.time,"onUpdate:modelValue":[x=>n.time=x,x=>k(b,{time:x})],ctrl:!1,min:.1,max:20,class:"time"},{icon:h(()=>[$e]),_:2},1032,["modelValue","onUpdate:modelValue","min"])])):R("",!0)],64))),128))],512)])):(c(),f("p",Ee,"\u6682\u65E0\u5BFC\u89C8"))])}}});const Ge=U(Ae,[["__scopeId","data-v-ad325a61"]]),Ie=D(" \u65B0\u589E "),Re=I({__name:"index",setup(_){const r=m(),e=()=>r.value=null,a=(i,d=!1)=>{r.value=i,ue(),d&&V.value.push(i),ie.on("leave",e)},k=i=>{const d=V.value.indexOf(i);V.value.splice(d,1)};return W(ce),(i,d)=>{const F=v("ui-icon"),w=v("ui-button"),g=v("ui-group"),y=v("ui-editor-toolbar");return c(),f(A,null,[u(l(_e),null,{default:h(()=>[u(g,{borderBottom:""},{header:h(()=>[u(w,{onClick:d[0]||(d[0]=t=>a(l(le)(),!0))},{default:h(()=>[u(F,{type:"add"}),Ie]),_:1})]),_:1}),u(g,{title:"\u5BFC\u89C8\u5217\u8868"},{default:h(()=>[(c(!0),f(A,null,j(l(V),t=>(c(),E(fe,{key:t.id,guide:t,onPlay:p=>l(z)(t.paths),onEdit:p=>a(t),onDelete:p=>k(t)},null,8,["guide","onPlay","onEdit","onDelete"]))),128))]),_:1})]),_:1}),u(y,{toolbar:!!r.value,class:"video-toolbar"},{default:h(()=>[r.value?(c(),E(Ge,{key:0,data:r.value},null,8,["data"])):R("",!0)]),_:1},8,["toolbar"])],64)}}});const Oe=U(Re,[["__scopeId","data-v-5b60fb95"]]);export{Oe as default};
|