Closed zzgxx closed 2 years ago
<div>
<vue-qr :color-dark="data.colorDark" :color-light="data.colorLight" :logo-src="data.logoImg" :text="data.url" :size="data.imgSize" />
</div>
import vueQr from 'vue-qr'
export default {
components: {
vueQr,
},
setup() {
let data = reactive({
url: 'https://www.*****.com',
imgSize: 200,
logoImg: '',
colorDark: '#333333', // 二维码颜色
colorLight: '#ffffff' // 二维码背景色
// canvas: {}
})
return{data}
}
}
v2.4.0支持了,import 需要改一下 import vueQr from 'vue-qr/src/packages/vue-qr.vue'
希望作者可以在文档中说明一下奥
[Vue warn]: Property "$createElement" was accessed during render but is not defined on instance.
[Vue warn]: Property "_self" was accessed during render but is not defined on instance.
[Vue warn]: Unhandled error during execution of render function at <VueQr color-dark="#333333" color-light="#ffffff" logo-src="" ... >
[Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/vue-next
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c')
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c')