1.生成二维码工具 vue-qriously
- 安装
npm i vue-qriously -S
- 引入
//main.js
import Vue from 'vue'
import VueQriously from 'vue-qriously'
Vue.use(VueQriously)
- 使用
//home.vue
<template>
<div>
<qriously :value="qrcode" :size="200" />
</div>
</template>
<script>
export default {
data() {
return {
qrcode: 'www.baidu.com'
}
}
}
</script>