How to use the qrcode/build/qrcode.toString function in qrcode

To help you get started, we’ve selected a few qrcode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fengyuanchen / vue-qrcode / src / index.js View on Github external
/* istanbul ignore if */
          if (error) {
            throw error;
          }
        });
      } else if (tag === 'img') {
        QRCode.toDataURL(value, options, (error, url) => {
          /* istanbul ignore if */
          if (error) {
            throw error;
          }

          this.$el.src = url;
        });
      } else {
        QRCode.toString(value, options, (error, string) => {
          /* istanbul ignore if */
          if (error) {
            throw error;
          }

          this.$el.innerHTML = string;
        });
      }
    },
  },