import{d as F,f as c,u as f,U as a,a2 as E,ad as D,af as t,a4 as i,k as e,G as g}from"./vue-vendor-CxLCUzY4.js";import{Q as v}from"./index-DpxmcUhi.js";import{bg as B,_ as q}from"./index-B_2CoVdl.js";import{C as b}from"./index-Dz2zbQB_.js";import{P as A}from"./index-DaObvZxT.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-exs4VcBw.js";import"./index-DAURrYyA.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./useContentHeight-BWLGvKEC.js";import"./useWindowSizeFn-C3WExEpc.js";import"./useContentViewHeight-DlpfApuB.js";import"./usePageContext-HMYqek-Q.js";import"./injectionKey-DPVn4AgL.js";const w="https://www.vvbin.cn",U=F({components:{CollapseContainer:b,QrCode:v,PageWrapper:A},setup(){const o=c(null),l=c(null);function d(){const u=f(o);u&&u.download("文件名")}function s(){const u=f(l);u&&u.download("Qrcode")}function m({ctx:u}){u instanceof CanvasRenderingContext2D&&(u.fillStyle="black",u.font='16px "微软雅黑"',u.textBaseline="bottom",u.textAlign="center",u.fillText("你帅你先扫",100,195,200))}return{onQrcodeDone:m,qrCodeUrl:w,LogoImg:B,download:d,downloadDiy:s,qrRef:o,qrDiyRef:l}}}),_={class:"flex flex-wrap"};function k(o,l,d,s,m,u){const r=a("QrCode"),n=a("CollapseContainer"),p=a("a-button"),C=a("PageWrapper");return E(),D(C,{title:"二维码组件使用示例"},{default:t(()=>[i("div",_,[e(n,{title:"基础示例",canExpan:!0,class:"text-center mb-6 qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl},null,8,["value"])]),_:1}),e(n,{title:"渲染成img标签示例",class:"text-center mb-6 qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl,tag:"img"},null,8,["value"])]),_:1}),e(n,{title:"配置样式示例",class:"text-center mb-6 qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl,options:{color:{dark:"#55D187"}}},null,8,["value"])]),_:1}),e(n,{title:"本地logo示例",class:"text-center mb-6 qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl,logo:o.LogoImg},null,8,["value","logo"])]),_:1}),e(n,{title:"在线logo示例",class:"text-center mb-6 qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl,logo:"http://jeecg.com/images/logo.png",options:{color:{dark:"#55D187"}}},null,8,["value"])]),_:1}),e(n,{title:"logo配置示例",class:"text-center mb-6 qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl,logo:{src:"http://jeecg.com/images/logo.png",logoSize:.2,borderSize:.05,borderRadius:50,bgColor:"blue"}},null,8,["value"])]),_:1}),e(n,{title:"下载示例",class:"text-center qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl,ref:"qrRef",logo:o.LogoImg},null,8,["value","logo"]),e(p,{class:"mb-2",type:"primary",onClick:o.download},{default:t(()=>l[0]||(l[0]=[g(" 下载 ")])),_:1},8,["onClick"]),l[1]||(l[1]=i("div",{class:"msg"}," (在线logo会导致图片跨域，需要下载图片需要自行解决跨域问题) ",-1))]),_:1}),e(n,{title:"配置大小示例",class:"text-center qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl,width:300},null,8,["value"])]),_:1}),e(n,{title:"扩展绘制示例",class:"text-center qrcode-demo-item"},{default:t(()=>[e(r,{value:o.qrCodeUrl,width:200,options:{margin:5},ref:"qrDiyRef",logo:o.LogoImg,onDone:o.onQrcodeDone},null,8,["value","logo","onDone"]),e(p,{class:"mb-2",type:"primary",onClick:o.downloadDiy},{default:t(()=>l[2]||(l[2]=[g(" 下载 ")])),_:1},8,["onClick"]),l[3]||(l[3]=i("div",{class:"msg"}," 要进行扩展绘制则不能将tag设为img ",-1))]),_:1})])]),_:1})}const K=q(U,[["render",k],["__scopeId","data-v-2105d834"]]);export{K as default};
