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 P,a as r,B as v,k as u,i as d,w as m,e as f,A as V,f as p,g as t,u as _,a0 as b,b as D,j as h,t as i,aM as I,V as N}from"./index-AFhnwzwZ.js";import{R as j}from"./index-B9RHPT66.js";const z={"element-loading-background":"transparent"},A={class:"w-[18vw]"},M={class:"mt-1 text-center"},E={class:"flex flex-wrap justify-center items-center text-center"},J={key:1,class:"mt-1"},$=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: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=V("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",M," 温馨提示:右键上方裁剪区可开启功能菜单 ",512),[[b,o.value]])])]),default:m(()=>[t("div",E,[s.value?(p(),D(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",J,[t("p",null," 图像大小:"+i(parseInt(e.value.width))+" × "+i(parseInt(e.value.height))+"像素 ",1),t("p",null," 文件大小:"+i(_(I)(e.value.size))+"("+i(e.value.size)+" 字节) ",1)])):h("",!0)])]),_:1},8,["visible"])])),[[S,!o.value]])}}}),H=N($);export{H as R};
|