import{_ as e,r as l,c as a,d as o,e as d,f as t,g as i,i as s,h as u,k as m,n as p,j as r,al as c,an as n,p as f,t as v,v as b}from"./index.286e9b79.js";import{E as V,a as j}from"./form.ad10dcd5.js";import{E as g}from"./switch.197584d0.js";import{E as _}from"./image-viewer.b538fe01.js";import{E as h}from"./col.5ff06cbd.js";import{E as x}from"./input.31de1b37.js";import"./form-item.9355e6dc.js";/* empty css                    *//* empty css              */import{_ as y}from"./material.90ee622d.js";import{E as w,a as k}from"./index.569c0449.js";import"./_initCloneObject.fb8fbaea.js";import"./validator.18338d56.js";import"./event.776e7e11.js";import"./debounce.caafe00b.js";import"./index.ed3ed02e.js";import"./position.1bd00850.js";import"./scroll.a50153b5.js";import"./loading.c49775a6.js";import"./pagination.22bb50f6.js";import"./select.297a82d5.js";import"./index.27150c7e.js";import"./token.34cb8214.js";import"./strings.8c60bfae.js";import"./isEqual.57d72c4a.js";import"./_baseIteratee.9ead53a1.js";/* empty css            */import"./progress.27d0e11c.js";import"./cloneDeep.15b627aa.js";import"./dialog.ec9503d2.js";import"./overlay.2c1583ac.js";import"./message-box.6a8eb828.js";import"./http.f588794f.js";const E=e=>(v("data-v-21ab3c0c"),e=e(),b(),e),U=E((()=>u("div",{class:"widget-title"},[u("div",null,"视频")],-1))),C={class:"content"},z={class:"content-wrap"},I=E((()=>u("div",{class:"attribute-item"},[u("div",{class:"attr-title flex"},"视频来源")],-1))),O={key:1,class:"video-box"},P=["src","autoplay","loop"],q=E((()=>u("div",{class:"line"},null,-1))),A={class:"content-wrap"},D=E((()=>u("div",{class:"attribute-item"},[u("div",{class:"attr-title flex"},"视频比例")],-1))),B=e({__name:"panel",props:{modelValue:{type:[Object,Array],default:{}}},emits:["update:modelValue"],setup(e,{emit:v}){const b=e;let E=l(!1),B=l(".jpg,.png,.gif,.bmp"),F=l(0);const G=e=>{E.value=!1,1==F.value?b.modelValue.image=e[0].photo:b.modelValue.video.url=e[0].photo},H=()=>{F.value=0,E.value=!0,B.value=".mp4"},J=()=>{F.value=1,E.value=!0,B.value=".jpg,.jpeg,.png,.gif,.bmp"};return(e,l)=>{const v=y,F=w,K=k,L=V,M=a("VideoPlay"),N=f,Q=x,R=h,S=a("Plus"),T=_,W=g,X=j;return o(),d("div",null,[t(v,{limit:1,modelValue:i(E),"onUpdate:modelValue":l[0]||(l[0]=e=>s(E)?E.value=e:E=e),onChange:G,accept:i(B)},null,8,["modelValue","accept"]),U,u("div",C,[t(X,{"label-position":"left"},{default:m((()=>[u("div",z,[I,t(L,{label:"视频来源","label-width":"100px"},{default:m((()=>[t(K,{modelValue:b.modelValue.source,"onUpdate:modelValue":l[1]||(l[1]=e=>b.modelValue.source=e)},{default:m((()=>[t(F,{value:0},{default:m((()=>[p("本地")])),_:1}),t(F,{value:1},{default:m((()=>[p("网络")])),_:1})])),_:1},8,["modelValue"])])),_:1}),0==b.modelValue.source?(o(),r(L,{key:0,label:"视频上传","label-width":"100px"},{default:m((()=>[u("div",{class:"upload-box",onClick:H,style:c({border:null==b.modelValue.video.url?"1px dashed #dcdfe6":"0px dashed #dcdfe6"})},[null==b.modelValue.video.url?(o(),r(N,{key:0,size:"50",color:"#999"},{default:m((()=>[t(M)])),_:1})):n("",!0),null!=b.modelValue.video.url?(o(),d("div",O,[u("video",{src:b.modelValue.video.url,autoplay:b.modelValue.autoplay,loop:b.modelValue.loop,width:"260",height:"120"},"您的浏览器不支持 video 标签。",8,P)])):n("",!0)],4)])),_:1})):n("",!0),1==b.modelValue.source?(o(),r(L,{key:1,label:"视频地址","label-width":"100px"},{default:m((()=>[t(R,{span:24},{default:m((()=>[t(Q,{modelValue:b.modelValue.video.url,"onUpdate:modelValue":l[2]||(l[2]=e=>b.modelValue.video.url=e),placeholder:"请输入视频地址"},null,8,["modelValue"])])),_:1})])),_:1})):n("",!0),t(L,{label:"视频封面","label-width":"100px"},{default:m((()=>[u("div",{class:"upload-box",onClick:J,style:c({border:""==b.modelValue.image?"1px dashed #dcdfe6":"0px dashed #dcdfe6"})},[""==b.modelValue.image?(o(),r(N,{key:0,size:"25",color:"#666"},{default:m((()=>[t(S)])),_:1})):n("",!0),""!=b.modelValue.image?(o(),r(T,{key:1,style:{width:"100%",height:"100%"},src:b.modelValue.image,fit:"contain"},null,8,["src"])):n("",!0)],4)])),_:1}),t(L,{label:"自动播放","label-width":"100px"},{default:m((()=>[t(W,{modelValue:b.modelValue.autoplay,"onUpdate:modelValue":l[3]||(l[3]=e=>b.modelValue.autoplay=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])])),_:1}),t(L,{label:"循环播放","label-width":"100px"},{default:m((()=>[t(W,{modelValue:b.modelValue.loop,"onUpdate:modelValue":l[4]||(l[4]=e=>b.modelValue.loop=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])])),_:1})]),q,u("div",A,[D,t(L,{label:"比例大小","label-width":"100px"},{default:m((()=>[t(K,{modelValue:b.modelValue.style,"onUpdate:modelValue":l[5]||(l[5]=e=>b.modelValue.style=e)},{default:m((()=>[t(F,{value:1},{default:m((()=>[p("16:9")])),_:1}),t(F,{value:2},{default:m((()=>[p("4:3")])),_:1}),t(F,{value:3},{default:m((()=>[p("1:1")])),_:1})])),_:1},8,["modelValue"])])),_:1})])])),_:1})])])}}},[["__scopeId","data-v-21ab3c0c"]]);export{B as default};
