Nationwide Polamorous Matrimony

    @xqui/qrcode

    1.0.1 • Public • Published

    xq-qrcode

    A web component for generate a qrcode image based on qrcode.js

    XqQrcodeProps {
      color?: string,       // 颜色 
      value: string,        // 二维码的值
      size: string | number // 长宽的大小
    }

    Usage

    • script
    <script src="./qrcode.js"></script>
    <xq-qrcode value="duck" size='200'></xq-qrcode>
    • dynamic change value
    <script src="./qrcode.js"></script>
    <xq-qrcode size='200'></xq-qrcode>
    
    <script>
    var img_src = 'img_callback_url';
    $('xq-qrcode').attr('value', img_src);
    </script>
    • es6+/modern lib(framework)
    import React from 'react';
    import '@xqui/qrcode';
    
    function Foo() {
      return (
        <xq-qrcode value="duck" size='200' color="yellow"></xq-qrcode>
      )
    }

    Keywords

    none

    Install

    npm i @xqui/qrcode

    DownloadsWeekly Downloads

    4

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    9.22 kB

    Total Files

    6

    Last publish

    Collaborators

    • konglx