V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
xiaodaiguaray
V2EX  ›  Vue.js

vue3-next-qrcode 一个关于 vue3 的二维码组件

  •  
  •   xiaodaiguaray ·
    XiaoDaiGua-Ray · 234 天前 · 471 次点击
    这是一个创建于 234 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Vue3NextQrcode

    使用 TypeScript 基于 awesome-qr.jsVue3 开发的二维码组件。支持丰富的配置属性,并且支持:LOGO 、BackgroundImage 、GIF 等。简单配置,即可使用漂亮好看的二维码~

    效果图

    动图( GIF )

    下载.gif

    标志( LOGO )

    下载.png

    背景图( BackgroundImage )

    下载 (1).png

    安装

    npm i vue3-next-qrcode
    

    使用示例

    基础二维码

    <script lang="ts" setup>
    import { Vue3NextQrcode } from 'vue3-next-qrcode'
    </script>
    
    <template>
      基础二维码
      <Vue3NextQrcode text="hello" />
      LOGO 二维码
      <Vue3NextQrcode text="hello" logoImage="your logo image" />
      BackgroundImage 二维码
      <Vue3NextQrcode text="hello" backgroundImage="your logo image" />
    </template>
    

    GIF 二维码

    注意:使用 GIF URL 的时候,应该使用 gifBackgroundURL 属性。

    <script lang="ts" setup>
    import { Vue3NextQrcode } from 'vue3-next-qrcode'
    </script>
    
    <template>
      GIF URL
      <Vue3NextQrcode text="hello" gifBackgroundURL="your gif url" />
      GIF ArrayBuffer
      <Vue3NextQrcode text="hello" gifBackground="your gif ArrayBuffer" />
    </template>
    

    项目地址

    vue3-next-qrcode

    最后

    如果觉得该项目对你有帮助,可以点一个小星星,或者提出你的宝贵意见~

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2829 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 06:23 · PVG 14:23 · LAX 23:23 · JFK 02:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.