TabImage-af69f9af.js 3.6 KB

1
  1. import{d as G,c_ as K,e as L,r as V,x as N,o,c as m,a as r,C as n,G as S,D as $,f as e,B as l,A as O,E as j,a2 as P,_ as W,K as q,L as F,a$ as H,I as J,bi as Q,M as R,N as X,__tla as Y}from"./index-e8bff8cb.js";import{W as Z,__tla as aa}from"./main-72778113.js";import{u as ta,U as ea,__tla as la}from"./useUpload-4185b598.js";import{u as ra,__tla as _a}from"./useMessage-de42a595.js";import{_ as sa}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ca}from"./index.vue_vue_type_script_setup_true_lang-75f84d87.js";import{__tla as oa}from"./index-35928fe5.js";import{__tla as ua}from"./main-555e2935.js";import{__tla as ia}from"./el-image-7cacfc0f.js";import{__tla as ma}from"./el-image-viewer-aab7739e.js";import{__tla as na}from"./main-e1788fb7.js";import{__tla as da}from"./main.vue_vue_type_script_setup_true_lang-dc78df78.js";import{__tla as pa}from"./index-417b4018.js";import{__tla as fa}from"./index-2a11aba2.js";import{__tla as ya}from"./formatTime-4fdd5566.js";let w,ha=Promise.all([(()=>{try{return Y}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return oa}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=(_=>(R("data-v-675b1d7d"),_=_(),X(),_))(()=>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=sa(G({__name:"TabImage",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:x}){const C=ra(),M={Authorization:"Bearer "+K()},A=_,B=x,a=L({get:()=>A.modelValue,set:t=>B("update:modelValue",t)}),s=V(!1),h=V([]),u=N({accountId:a.value.accountId,type:"image",title:"",introduction:""}),T=t=>ta(ea.Image,2)(t),U=t=>{if(t.code!==0)return C.error("\u4E0A\u4F20\u51FA\u9519\uFF1A"+t.msg),!1;h.value=[],u.title="",u.introduction="",v(t.data)},z=()=>{a.value.mediaId=null,a.value.url=null,a.value.name=null},v=t=>{s.value=!1,a.value.mediaId=t.mediaId,a.value.url=t.url,a.value.name=t.name};return(t,c)=>{const g=W,i=q,I=F,D=H,b=J,E=Q;return o(),m("div",null,[r(a).url?(o(),m("div",d,[n("img",{class:"material-img",src:r(a).url},null,8,p),r(a).name?(o(),m("p",f,S(r(a).name),1)):$("",!0),e(I,{class:"ope-row",justify:"center"},{default:l(()=>[e(i,{type:"danger",circle:"",onClick:z},{default:l(()=>[e(g,{icon:"ep:delete"})]),_:1})]),_:1})])):(o(),O(I,{key:1,style:{"text-align":"center"},align:"middle"},{default:l(()=>[e(b,{span:12,class:"col-select"},{default:l(()=>[e(i,{type:"success",onClick:c[0]||(c[0]=k=>s.value=!0)},{default:l(()=>[j(" \u7D20\u6750\u5E93\u9009\u62E9 "),e(g,{icon:"ep:circle-check"})]),_:1}),e(D,{title:"\u9009\u62E9\u56FE\u7247",modelValue:r(s),"onUpdate:modelValue":c[1]||(c[1]=k=>P(s)?s.value=k:null),width:"90%","append-to-body":"","destroy-on-close":""},{default:l(()=>[e(r(Z),{type:"image","account-id":r(a).accountId,onSelectMaterial:v},null,8,["account-id"])]),_:1},8,["modelValue"])]),_:1}),e(b,{span:12,class:"col-add"},{default:l(()=>[e(E,{action:"/dev-api/admin-api/mp/material/upload-temporary",headers:M,multiple:"",limit:1,"file-list":r(h),data:r(u),"before-upload":T,"on-success":U},{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};