index-3b356148.js 855 B

1
  1. import{b as l}from"./browser-e949d08f.js";import{d as n,r,w as d,y as i,z as g,a as s}from"./index-35c97d5b.js";const f=""+new URL("smallLogo-517ff5bd.png",import.meta.url).href,m="_qrcode_1bxz6_1",u="_qrcodeCanvas_1bxz6_4",q="_qrcodeLogo_1bxz6_8",_="_small_1bxz6_22",e={qrcode:m,qrcodeCanvas:u,qrcodeLogo:q,small:_},v=n({props:{text:{type:String,default:""},size:{type:String,default:"200px"},logoSrc:{type:String,default:void 0},logoSize:{type:String,default:"default"}},setup(o){const t=r(),a=()=>{l.toCanvas(t.value,o.text,{margin:1},c=>{c&&console.log(c),console.log("success")})};return d(()=>o.text,()=>{a()}),i(()=>{g(()=>{a()})}),()=>s("div",{class:e.qrcode,style:{width:o.size,height:o.size}},[s("canvas",{ref:t,class:e.qrcodeCanvas},null),s("img",{src:o.logoSrc||f,class:[e.qrcodeLogo,o.logoSize==="small"&&e.small]},null)])}});export{v as M};