qrcode & vue


$ yarn add qrcode.vue # OR $ npm i -S qrcode.vue

https://www.npmjs.com/package/qrcode.vue

single-file components

demo-qrcode.vue


<template>
<div>
<qrcode-vue :value="url" :size="size" level="H"></qrcode-vue>
</div>
</template>
<script> import QrcodeVue from "qrcode.vue"';
export default {
data() {
return {
url: "https://github.xgqfrms.xyz",
size: 100,
}
},
components: {
QrcodeVue,
},
}
</script>

bug

http://47.97.241.6:8080/eapp/iframeTest/index.html#https://m.weibo.cn

https://github.com/scopewu/qrcode.vue/issues/10

https://github.com/scopewu/qrcode.vue/blob/master/src/index.js

solutions

level = L

https://github.com/scopewu/qrcode.vue#component-props

https://github.com/scopewu/qrcode.vue/issues/10#issuecomment-487810869

I think this a little bug of my code , because using the wrong the symbol's capacity.


node-qrcode

https://www.npmjs.com/package/qrcode

https://github.com/soldair/node-qrcode


setTimeout(() => {
// const QRCode = require("qrcode");
let canvas = document.getElementById("qrcode_canvas");
// canvas.width = 100;
// canvas.height = 100;
// canvas.style.width = "100px";
// canvas.style.height = "100px";
let url = this.url;
QRCode.toCanvas(
canvas,
url,
{
width: 120,
errorCorrectionLevel: "H",
},
function (error) {
if (error) {
console.error(error);
} else {
console.log("success!");
}
}
);
}, 0);

qrcode.js

https://davidshimjs.github.io/qrcodejs/

https://github.com/davidshimjs/qrcodejs

qrcode & vue的更多相关文章

  1. VUE使用QRcode或者vue-qr生成二维码

    这里介绍两种vue生成二维码的方法 QRcode vue-qr vue-qr比QRcode功能多在可以在中间加logo 下面先介绍QRcode vue里安装qrcodejs的npm包 npm inst ...

  2. URL & QRcode auto generator

    URL & QRcode auto generator 二维码 npm & qrcode https://www.npmjs.com/package/qrcode https://ww ...

  3. vue环境中生成二维码

    <template><div><div id='code'></div><canvas id="canvas">< ...

  4. vue2.0 自定义 生成二维码(QRCode)组件

    1.自定义 生成二维码组件 QRCode.vue <!-- 生成二维码 组件 --> <template> <canvas class="qrcode-canv ...

  5. vue 二维码长按保存和复制内容

    效果图: 二维码用了 qrcode.vue npm install qrcode.vue --save 复制内容用了 vue-clipboard2 npm install vue-clipboard2 ...

  6. 移动端h5页面的那些坑

    最近一直在写移动端页面,由于之前写移动端写的比较少,所以此次踩过许多坑.特此总结一下: 1.<input type='button'>背景色在ios中的兼容性,颜色发白 解决办法:在全局样 ...

  7. Vue使用QRCode.js生成二维码

    1.安装qrcode npm install qrcode 2.组件中引入qrcode import QRCode from 'qrcode' 3.html代码 <div><span ...

  8. vue中使用qrcode,遇到两次渲染的问题

    1.安装 qrcodejs2: npm install qrcodejs2 --save 2.页面中引入: import QRCode from "qrcodejs2";   co ...

  9. Vue前端利用qrcode生成二维码

    <div id="qrcode" style="width: 560px;height: 560px;background-color: white;"& ...

随机推荐

  1. js autocomplete输入延迟触发执行事件

    需求:延迟查询,autocomplete延迟触发执行事件.当有下一个事件开始时,本次事件中断.目的是为了防止调用服务器过于频繁. var timeout = 0;//延时处理 $("#cus ...

  2. 经典面试题:从 URL 输入到页面展现到底发生什么?

    前言 打开浏览器从输入网址到网页呈现在大家面前,背后到底发生了什么?经历怎么样的一个过程?先给大家来张总体流程图,具体步骤请看下文分解! 本文首发地址为GitHub 博客,写文章不易,请多多支持与关注 ...

  3. 弹框在UC浏览器或者Android机器上会被顶上去

    弹框在UC浏览器或者Android机器上会被顶上去 可以通过监听resize事件 this.height = $(document).height(); window.addEventListener ...

  4. SBC数据格式转换软件

    北京博信施科技有限公司是一家专业从事数据格式转换.数据处理领域研发软件产品和解决方案实施的技术型公司.在当今信息时代,PDF文档格式是在Internet上进行电子文档发行和数字化信息传播的理想文档格式 ...

  5. 测试系统工程师TSE需要具备的四项能力

    文/杨学明 如今,国内所有的研发型的公司都有测试部门,无论测试团队大小,都有测试组长,测试经理,测试工程师等头衔,但随着产品和业务的质量要求越来越高,产品的市场竞争越来越激烈,公司领导对产品测试的要求 ...

  6. 容器化系列 - 通过Grafana监测InfluxDB数据 on Docker

    本文演示在Docker中运行Grafana和InfluxDB,并通过Grafana展示InfluxDB曲线图. 1 准备工作 1.1 安装Docker 请参考这里 1.2 下载镜像 $ docker ...

  7. C#中Skip和Take的用法

    Skip()和Take()方法都是IEnumerable<T> 接口的扩展方法,包括C#中的所有Collections类,如ArrayList,Queue,Stack等等,还有数组和字符串 ...

  8. 定时任务 Cron表达式

    Cron表达式由6~7项组成,中间用空格分开.从左到右依次是: 秒.分.时.日.月.周几.年(可省略) Cron表达式的值可以是数字,也可以是以下符号: "*":所有值都匹配 &q ...

  9. 扒一扒EOS的前世今生

    扒一扒EOS的前世今生 EOS是什么?   EOS可以认为是Enterprise Operation System的缩写,即商用的一款分布式区块链操作系统,EOS主要为了解决百万级用户的使用问题,为企 ...

  10. 【腾讯云服务器】基于centos7搭建ftp服务器(vsftpd)

    该博客分为三部分设置,1.ftp服务器搭建.2.防火墙设置  3.腾讯云安全组 一.ftp服务器搭建 1.1  安装vsftpd yum install vsftpd -y 1.2 启动vsftpd服 ...