TabImage-6a42b4e6.js 3.6 KB

1
  1. import{d as H,c_ as K,e as L,r as k,x as P,o,c as m,a as r,B as n,E as S,a2 as T,f as e,A as l,C as F,D as C,a1 as W,_ as Z,J as q,K as G,aZ as N,H as O,bg as Q,L as R,M as X,__tla as Y}from"./index-f65577b8.js";import{W as $,__tla as aa}from"./main-b4f45b1e.js";import{u as ta,U as ea,__tla as la}from"./useUpload-cf3b73e9.js";import{u as ra,__tla as _a}from"./useMessage-4dbf0ae4.js";import{_ as sa}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ca}from"./index.vue_vue_type_script_setup_true_lang-53598c8e.js";import{__tla as oa}from"./index-1896261a.js";import{__tla as ua}from"./main-c466a0ed.js";import{__tla as ia}from"./el-image-6b44629c.js";import{__tla as ma}from"./el-image-viewer-7e496319.js";import{__tla as na}from"./main-9da0171a.js";import{__tla as da}from"./main.vue_vue_type_script_setup_true_lang-63bb1864.js";import{__tla as pa}from"./index-7941cf53.js";import{__tla as fa}from"./index-47645419.js";import{__tla as ya}from"./formatTime-411ed1a1.js";let j,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)),j=sa(H({__name:"TabImage",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:x}){const M=ra(),w={Authorization:"Bearer "+K()},A=_,B=x,a=L({get:()=>A.modelValue,set:t=>B("update:modelValue",t)}),s=k(!1),h=k([]),u=P({accountId:a.value.accountId,type:"image",title:"",introduction:""}),J=t=>ta(ea.Image,2)(t),U=t=>{if(t.code!==0)return M.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=Z,i=q,I=G,D=N,V=O,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)):T("",!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(),F(I,{key:1,style:{"text-align":"center"},align:"middle"},{default:l(()=>[e(V,{span:12,class:"col-select"},{default:l(()=>[e(i,{type:"success",onClick:c[0]||(c[0]=b=>s.value=!0)},{default:l(()=>[C(" \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]=b=>W(s)?s.value=b:null),width:"90%","append-to-body":"","destroy-on-close":""},{default:l(()=>[e(r($),{type:"image","account-id":r(a).accountId,onSelectMaterial:v},null,8,["account-id"])]),_:1},8,["modelValue"])]),_:1}),e(V,{span:12,class:"col-add"},{default:l(()=>[e(E,{action:"/dev-api/admin-api/mp/material/upload-temporary",headers:w,multiple:"",limit:1,"file-list":r(h),data:r(u),"before-upload":J,"on-success":U},{tip:l(()=>[y]),default:l(()=>[e(i,{type:"primary"},{default:l(()=>[C("\u4E0A\u4F20\u56FE\u7247")]),_:1})]),_:1},8,["file-list","data"])]),_:1})]),_:1}))])}}}),[["__scopeId","data-v-675b1d7d"]])});export{ha as __tla,j as default};