1 |
- import{_ as p,e as n,b as y,h as f,o as v,c as x,B as l,aH as s,aO as b,n as _,__tla as w}from"./index-54aa57d8.js";let c,S=Promise.all([(()=>{try{return w}catch{}})()]).then(async()=>{let d;d=["src"],c=p({__name:"ImageCard",props:{url:{type:String,required:!0},width:{type:[String,Number],required:!0},height:{type:[String,Number],required:!0},radius:{type:[String,Number],default:5},containerStyle:{type:Object,default:()=>({})},imgContainerStyle:{type:Object,default:()=>({})},textContainerStyle:{type:Object,default:()=>({})}},setup(t){const e=t,u=n(()=>`min(${e.width}px, 80vw)`),m=n(()=>typeof e.height=="number"?`${e.height}px`:e.height),h=n(()=>typeof e.radius=="number"?`${e.radius}px`:e.radius),a=()=>{_(()=>{const r=document.querySelectorAll(".card-img");let i=1/0;r.forEach(g=>{const o=g.clientWidth;o<i&&(i=o)}),i!==1/0&&(minWidth.value=i)})};return y(()=>{a(),window.addEventListener("resize",a)}),f(()=>{window.removeEventListener("resize",a)}),(r,i)=>(v(),x("div",{class:"",style:s([{display:"flex","align-items":"center"},{...t.containerStyle}])},[l("div",{class:"img-container",style:s({width:u.value,height:m.value,marginRight:"10px",border:"1px solid rgb(220 223 231)",borderRadius:h.value,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",...t.imgContainerStyle})},[l("img",{src:t.url,class:"card-img",style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}},null,8,d)],4),l("div",{class:"text-container",style:s([{"flex-grow":"1","min-width":"50px","line-height":"25px"},{...t.textContainerStyle}])},[b(r.$slots,"label",{},void 0,!0)],4)],4))}},[["__scopeId","data-v-061fa5de"],["__file","D:/zx/mall-newfeifan-zx-admin/src/components/ImageCard/ImageCard.vue"]])});export{c as I,S as __tla};
|