1 |
- import{d as E,co as H,b as J,aU as R,r as g,f as G,o as m,c as O,g as u,a as t,l as I,W as P,i as _,w as r,j as x,y as X,v as K,J as L,bo as N,cu as Q,ac as T,ad as Y,_ as Z,__tla as $}from"./index-afaf388d.js";import{E as aa,__tla as ta}from"./el-image-caa301d0.js";import{__tla as ea}from"./el-image-viewer-9330e340.js";import{W as ra,__tla as la}from"./main-96c9d589.js";import{U,u as sa,__tla as _a}from"./useUpload-271b5521.js";import{u as oa,__tla as ua}from"./useMessage-a290df31.js";import{__tla as ia}from"./index-89d02e79.js";import{__tla as ma}from"./index-0eed91e1.js";import{__tla as ca}from"./main-ec8fb9d1.js";import{__tla as na}from"./main-5e5bc66b.js";import{__tla as da}from"./main-1dc41615.js";import{__tla as pa}from"./index-4abf87ec.js";import{__tla as fa}from"./index-64b423d1.js";import{__tla as ya}from"./formatTime-42952e7f.js";let V,ha=Promise.all([(()=>{try{return $}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})()]).then(async()=>{let i,c,n,d,p;i=l=>(T("data-v-09ea8c50"),l=l(),Y(),l),c=i(()=>u("p",null,"\u5C01\u9762:",-1)),n={class:"thumb-div"},d={class:"thumb-but"},p=i(()=>u("div",{class:"el-upload__tip"},"\u652F\u6301 bmp/png/jpeg/jpg/gif \u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC7 2M",-1)),V=Z(E({__name:"CoverSelect",props:{modelValue:{type:Object,required:!0},isFirst:{type:Boolean,required:!0}},emits:["update:modelValue"],setup(l,{emit:w}){const f=oa(),z={Authorization:"Bearer "+H()},M=l,j=w,e=J({get:()=>M.modelValue,set(a){j("update:modelValue",a)}}),y=R("accountId"),s=g(!1),h=g([]),k=G({type:U.Image,accountId:y}),q=a=>{s.value=!1,e.value.thumbMediaId=a.mediaId,e.value.thumbUrl=a.url},C=a=>sa(U.Image,2)(a),S=a=>{if(a.code!==0)return f.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+a.msg),!1;h.value=[],e.value.thumbMediaId=a.data.mediaId,e.value.thumbUrl=a.data.url},B=a=>{f.error("\u4E0A\u4F20\u5931\u8D25: "+a.message)};return(a,o)=>{const F=aa,W=K,v=L,A=N,D=Q;return m(),O("div",null,[c,u("div",n,[t(e).thumbUrl?(m(),I(F,{key:0,style:{width:"300px","max-height":"300px"},src:t(e).thumbUrl,fit:"contain"},null,8,["src"])):(m(),I(W,{key:1,icon:"ep:plus",class:P(["avatar-uploader-icon",a.isFirst?"avatar":"avatar1"])},null,8,["class"])),u("div",d,[_(A,{action:"https://zxpt.newfeifan.cn/admin-api/mp/material/upload-permanent",headers:z,multiple:"",limit:1,"file-list":t(h),data:t(k),"before-upload":C,"on-error":B,"on-success":S},{trigger:r(()=>[_(v,{size:"small",type:"primary"},{default:r(()=>[x("\u672C\u5730\u4E0A\u4F20")]),_:1})]),tip:r(()=>[p]),default:r(()=>[_(v,{size:"small",type:"primary",onClick:o[0]||(o[0]=b=>s.value=!0),style:{"margin-left":"5px"}},{default:r(()=>[x(" \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=>X(s)?s.value=b:null),width:"80%","append-to-body":"","destroy-on-close":""},{default:r(()=>[_(t(ra),{type:"image","account-id":t(y),onSelectMaterial:q},null,8,["account-id"])]),_:1},8,["modelValue"])])])}}}),[["__scopeId","data-v-09ea8c50"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mp/draft/components/CoverSelect.vue"]])});export{ha as __tla,V as default};
|