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