。找了一下午的插件,不是教程太笼统,就是各种报错,最终用的是插件ay-qrcode。
。下载地址 生成二维码。传入链接,即可使用,可快速扫出链接 - DCloud 插件市场
。教程作者写的很详细,附链接 https://ext.dcloud.net.cn/plugin?id=3870
。下载源码解压,复制/components
下的组件至项目根目录的 /components
文件夹下
<view style="margin: 40upx;">
<ayQrcode ref="qrcode" :modal="modal_qr" :url="url" @hideQrcode="hideQrcode"
:height="300" :width="300" />
</view>
import ayQrcode from "@/components/ay-qrcode/ay-qrcode.vue"
export default {
components: {
ayQrcode,
},
data() {
return {
//二维码相关参数