1 |
- import{d as E,b0 as K,K as L,bL as N,r as g,e as P,o as m,c as T,g as i,a as t,v as x,Z as W,f as _,w as r,n as I,O as Z,j as G,C as H,b2 as J,aN as Q,p as R,k as X,_ as Y,__tla as $}from"./index-00b1998d.js";import{E as aa,__tla as ta}from"./el-image-69d4404b.js";import{__tla as ea}from"./el-image-viewer-612a5a0e.js";import{W as ra,__tla as la}from"./main-1f759c13.js";import{U as V,u as sa,__tla as _a}from"./useUpload-01e29a29.js";import{u as oa,__tla as ia}from"./useMessage-437e6444.js";import{__tla as ua}from"./index-0fc7c908.js";import{__tla as ma}from"./index-1e69ec9e.js";import{__tla as ca}from"./main-fca55d63.js";import{__tla as na}from"./main-beb29da9.js";import{__tla as pa}from"./main-3d2e5e02.js";import{__tla as da}from"./index-81ce6811.js";import{__tla as fa}from"./index-ace13ed9.js";import{__tla as ha}from"./formatTime-4e31c660.js";let w,ya=Promise.all([(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ha}catch{}})()]).then(async()=>{let u,c,n,p,d;u=l=>(R("data-v-09ea8c50"),l=l(),X(),l),c=u(()=>i("p",null,"\u5C01\u9762:",-1)),n={class:"thumb-div"},p={class:"thumb-but"},d=u(()=>i("div",{class:"el-upload__tip"},"\u652F\u6301 bmp/png/jpeg/jpg/gif \u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC7 2M",-1)),w=Y(E({__name:"CoverSelect",props:{modelValue:{type:Object,required:!0},isFirst:{type:Boolean,required:!0}},emits:["update:modelValue"],setup(l,{emit:z}){const f=oa(),M={Authorization:"Bearer "+K()},U=l,j=z,e=L({get:()=>U.modelValue,set(a){j("update:modelValue",a)}}),h=N("accountId"),s=g(!1),y=g([]),k=P({type:V.Image,accountId:h}),C=a=>{s.value=!1,e.value.thumbMediaId=a.mediaId,e.value.thumbUrl=a.url},B=a=>sa(V.Image,2)(a),S=a=>{if(a.code!==0)return f.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+a.msg),!1;y.value=[],e.value.thumbMediaId=a.data.mediaId,e.value.thumbUrl=a.data.url},q=a=>{f.error("\u4E0A\u4F20\u5931\u8D25: "+a.message)};return(a,o)=>{const F=aa,O=G,v=H,A=J,D=Q;return m(),T("div",null,[c,i("div",n,[t(e).thumbUrl?(m(),x(F,{key:0,style:{width:"300px","max-height":"300px"},src:t(e).thumbUrl,fit:"contain"},null,8,["src"])):(m(),x(O,{key:1,icon:"ep:plus",class:W(["avatar-uploader-icon",a.isFirst?"avatar":"avatar1"])},null,8,["class"])),i("div",p,[_(A,{action:"https://zxpt.newfeifan.cn/admin-api/mp/material/upload-permanent",headers:M,multiple:"",limit:1,"file-list":t(y),data:t(k),"before-upload":B,"on-error":q,"on-success":S},{trigger:r(()=>[_(v,{size:"small",type:"primary"},{default:r(()=>[I("\u672C\u5730\u4E0A\u4F20")]),_:1})]),tip:r(()=>[d]),default:r(()=>[_(v,{size:"small",type:"primary",onClick:o[0]||(o[0]=b=>s.value=!0),style:{"margin-left":"5px"}},{default:r(()=>[I(" \u7D20\u6750\u5E93\u9009\u62E9 ")]),_:1})]),_:1},8,["file-list","data"])]),_(D,{title:"\u9009\u62E9\u56FE\u7247",modelValue:t(s),"onUpdate:modelValue":o[1]||(o[1]=b=>Z(s)?s.value=b:null),width:"80%","append-to-body":"","destroy-on-close":""},{default:r(()=>[_(t(ra),{type:"image","account-id":t(h),onSelectMaterial:C},null,8,["account-id"])]),_:1},8,["modelValue"])])])}}}),[["__scopeId","data-v-09ea8c50"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mp/draft/components/CoverSelect.vue"]])});export{ya as __tla,w as default};
|