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