TabImage-5c826f21.js 3.6 KB

1
  1. import{d as J,bi as N,J as O,r as V,e as S,o as c,c as m,a as r,g as n,t as W,O as $,f as e,w as l,q as L,m as j,N as P,_ as D,B as F,i as G,a$ as H,E as K,bk as Q,p as R,j as X,__tla as Y}from"./index-2eab2d23.js";import{W as Z,__tla as aa}from"./main-16c68401.js";import{u as ta,U as ea,__tla as la}from"./useUpload-1c63b1eb.js";import{u as ra,__tla as sa}from"./useMessage-171aa63e.js";import{_ as _a}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as oa}from"./index.vue_vue_type_script_setup_true_lang-5730b053.js";import{__tla as ca}from"./index-cc63c3c4.js";import{__tla as ua}from"./main-74cfbf31.js";import{__tla as ia}from"./el-image-2171f3ff.js";import{__tla as ma}from"./el-image-viewer-5d14bc77.js";import{__tla as na}from"./main-ec2be832.js";import{__tla as da}from"./main.vue_vue_type_script_setup_true_lang-0610a4e1.js";import{__tla as pa}from"./index-4663832c.js";import{__tla as fa}from"./index-5f871167.js";import{__tla as ya}from"./formatTime-41155543.js";let w,ha=Promise.all([(()=>{try{return Y}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})()]).then(async()=>{let d,p,f,y;d={key:0,class:"select-item"},p=["src"],f={key:0,class:"item-name"},y=(s=>(R("data-v-675b1d7d"),s=s(),X(),s))(()=>n("span",null,[n("div",{class:"el-upload__tip"},"\u652F\u6301 bmp/png/jpeg/jpg/gif \u683C\u5F0F\uFF0C\u5927\u5C0F\u4E0D\u8D85\u8FC7 2M")],-1)),w=_a(J({__name:"TabImage",props:{modelValue:{}},emits:["update:modelValue"],setup(s,{emit:x}){const U=ra(),B={Authorization:"Bearer "+N()},C=s,M=x,a=O({get:()=>C.modelValue,set:t=>M("update:modelValue",t)}),_=V(!1),h=V([]),u=S({accountId:a.value.accountId,type:"image",title:"",introduction:""}),T=t=>ta(ea.Image,2)(t),q=t=>{if(t.code!==0)return U.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+t.msg),!1;h.value=[],u.title="",u.introduction="",g(t.data)},z=()=>{a.value.mediaId=null,a.value.url=null,a.value.name=null},g=t=>{_.value=!1,a.value.mediaId=t.mediaId,a.value.url=t.url,a.value.name=t.name};return(t,o)=>{const v=D,i=F,k=G,A=H,I=K,E=Q;return c(),m("div",null,[r(a).url?(c(),m("div",d,[n("img",{class:"material-img",src:r(a).url},null,8,p),r(a).name?(c(),m("p",f,W(r(a).name),1)):$("",!0),e(k,{class:"ope-row",justify:"center"},{default:l(()=>[e(i,{type:"danger",circle:"",onClick:z},{default:l(()=>[e(v,{icon:"ep:delete"})]),_:1})]),_:1})])):(c(),L(k,{key:1,style:{"text-align":"center"},align:"middle"},{default:l(()=>[e(I,{span:12,class:"col-select"},{default:l(()=>[e(i,{type:"success",onClick:o[0]||(o[0]=b=>_.value=!0)},{default:l(()=>[j(" \u7D20\u6750\u5E93\u9009\u62E9 "),e(v,{icon:"ep:circle-check"})]),_:1}),e(A,{title:"\u9009\u62E9\u56FE\u7247",modelValue:r(_),"onUpdate:modelValue":o[1]||(o[1]=b=>P(_)?_.value=b:null),width:"90%","append-to-body":"","destroy-on-close":""},{default:l(()=>[e(r(Z),{type:"image","account-id":r(a).accountId,onSelectMaterial:g},null,8,["account-id"])]),_:1},8,["modelValue"])]),_:1}),e(I,{span:12,class:"col-add"},{default:l(()=>[e(E,{action:"/admin-api/mp/material/upload-temporary",headers:B,multiple:"",limit:1,"file-list":r(h),data:r(u),"before-upload":T,"on-success":q},{tip:l(()=>[y]),default:l(()=>[e(i,{type:"primary"},{default:l(()=>[j("\u4E0A\u4F20\u56FE\u7247")]),_:1})]),_:1},8,["file-list","data"])]),_:1})]),_:1}))])}}}),[["__scopeId","data-v-675b1d7d"]])});export{ha as __tla,w as default};