1 |
- import{d as H,aR as I,Y as M,r as n,e as S,o as F,x as G,w as t,f as o,y as m,a as e,l as P,g as j,G as Y,bD as $,bS as A,R as E,C as J,H as K,bk as L,_ as N,__tla as O}from"./index-327f993b.js";import{U as Q,H as T,c as W,__tla as X}from"./upload-15a68b5d.js";import{u as Z,__tla as ee}from"./useMessage-b42f14d5.js";import{U as ae,__tla as le}from"./useUpload-056d25b8.js";let b,te=Promise.all([(()=>{try{return O}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return ee}catch{}})(),(()=>{try{return le}catch{}})()]).then(async()=>{let p;p=j("span",{class:"el-upload__tip",style:{"margin-left":"10px"}},"\u683C\u5F0F\u652F\u6301 MP4\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u8D85\u8FC7 10MB",-1),b=N(H({__name:"UploadVideo",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","uploaded"],setup(h,{emit:v}){const i=Z(),x=I("accountId"),U={title:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898",trigger:"blur"}],introduction:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0",trigger:"blur"}]},k=h,_=v,d=M({get:()=>k.modelValue,set(a){_("update:modelValue",a)}}),c=n([]),r=S({type:ae.Video,title:"",introduction:"",accountId:x}),f=n(null),y=n(null),w=()=>{var a;(a=f.value)==null||a.validate(l=>{var u;if(!l)return!1;(u=y.value)==null||u.submit()})},R=a=>{if(a.code!==0)return i.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+a.msg),!1;c.value=[],r.title="",r.introduction="",d.value=!1,i.notifySuccess("\u4E0A\u4F20\u6210\u529F"),_("uploaded")},C=a=>i.error(`\u4E0A\u4F20\u5931\u8D25: ${a.message}`);return(a,l)=>{const u=Y,q=$,z=A,V=E,g=J,B=K,D=L;return F(),G(D,{title:"\u65B0\u5EFA\u89C6\u9891",modelValue:e(d),"onUpdate:modelValue":l[3]||(l[3]=s=>P(d)?d.value=s:null),width:"600px"},{footer:t(()=>[o(u,{onClick:l[2]||(l[2]=s=>d.value=!1)},{default:t(()=>[m("\u53D6 \u6D88")]),_:1}),o(u,{type:"primary",onClick:w},{default:t(()=>[m("\u63D0 \u4EA4")]),_:1})]),default:t(()=>[o(q,{action:e(Q),headers:e(T),multiple:"",limit:1,"file-list":e(c),data:e(r),"before-upload":e(W),"on-error":C,"on-success":R,ref_key:"uploadVideoRef",ref:y,"auto-upload":!1,class:"mb-5"},{trigger:t(()=>[o(u,{type:"primary",plain:""},{default:t(()=>[m("\u9009\u62E9\u89C6\u9891")]),_:1})]),tip:t(()=>[p]),_:1},8,["action","headers","file-list","data","before-upload"]),o(z),o(B,{model:e(r),rules:U,ref_key:"uploadFormRef",ref:f},{default:t(()=>[o(g,{label:"\u6807\u9898",prop:"title"},{default:t(()=>[o(V,{modelValue:e(r).title,"onUpdate:modelValue":l[0]||(l[0]=s=>e(r).title=s),placeholder:"\u6807\u9898\u5C06\u5C55\u793A\u5728\u76F8\u5173\u64AD\u653E\u9875\u9762\uFF0C\u5EFA\u8BAE\u586B\u5199\u6E05\u6670\u3001\u51C6\u786E\u3001\u751F\u52A8\u7684\u6807\u9898"},null,8,["modelValue"])]),_:1}),o(g,{label:"\u63CF\u8FF0",prop:"introduction"},{default:t(()=>[o(V,{rows:3,type:"textarea",modelValue:e(r).introduction,"onUpdate:modelValue":l[1]||(l[1]=s=>e(r).introduction=s),placeholder:"\u4ECB\u7ECD\u8BED\u5C06\u5C55\u793A\u5728\u76F8\u5173\u64AD\u653E\u9875\u9762\uFF0C\u5EFA\u8BAE\u586B\u5199\u7B80\u6D01\u660E\u786E\u3001\u6709\u4FE1\u606F\u91CF\u7684\u5185\u5BB9"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}}),[["__file","D:/zhongxing/mall-newfeifan-zx-admin/src/views/mp/material/components/UploadVideo.vue"]])});export{te as __tla,b as default};
|