mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 00:18:51 +08:00
2 lines
1.5 KiB
JavaScript
2 lines
1.5 KiB
JavaScript
import{d as P,a as r,h as v,A as V,z as u,k as d,e as p,f as m,w as f,g as t,b,i as _,t as i,u as h,aO as z,$ as D,V as I}from"./index-DMqaFtX4.js";import{R as N}from"./index-DmyydM2r.js";const A={"element-loading-background":"transparent"},$={class:"w-[18vw]"},j={class:"mt-1 text-center"},E={class:"flex flex-wrap justify-center items-center text-center"},J={key:1,class:"mt-1"},M=P({name:"ReCropperPreview",__name:"index",props:{imgSrc:String},emits:["cropper"],setup(w,{expose:g,emit:C}){const k=C,e=r(),l=r(),x=r(),o=r(!1),s=r("");function R({base64:c,blob:n,info:a}){e.value=a,s.value=c,k("cropper",{base64:c,blob:n,info:a})}function y(){l.value.hide()}return g({hidePopover:y}),(c,n)=>{const a=v("el-image"),S=v("el-popover"),B=V("loading");return u((p(),d("div",A,[m(S,{ref_key:"popoverRef",ref:l,visible:o.value,placement:"right",width:"18vw"},{reference:f(()=>[t("div",$,[m(h(N),{ref_key:"refCropper",ref:x,src:w.imgSrc,circled:"",onCropper:R,onReadied:n[0]||(n[0]=O=>o.value=!0)},null,8,["src"]),u(t("p",j," 温馨提示:右键上方裁剪区可开启功能菜单 ",512),[[D,o.value]])])]),default:f(()=>[t("div",E,[s.value?(p(),b(a,{key:0,src:s.value,"preview-src-list":Array.of(s.value),fit:"cover"},null,8,["src","preview-src-list"])):_("",!0),e.value?(p(),d("div",J,[t("p",null," 图像大小:"+i(parseInt(e.value.width))+" × "+i(parseInt(e.value.height))+"像素 ",1),t("p",null," 文件大小:"+i(h(z)(e.value.size))+"("+i(e.value.size)+" 字节) ",1)])):_("",!0)])]),_:1},8,["visible"])])),[[B,!o.value]])}}}),G=I(M);export{G as R};
|