scopewu / qrcode.vue

A Vue.js component to generate qrcode. Supports both Vue 2 and Vue 3. 一款同时支援 Vue 2 和 Vue 3 的二维码组件。
https://qr-vue.tie.pub
MIT License
711 stars 87 forks source link

Export type `Level`. #65

Closed DiscreteTom closed 1 year ago

DiscreteTom commented 1 year ago

Currently the type Level is not exported, thus there will be a type error in TypeScript.

E.g.:

<template>
    <qrcode-vue  :level="level" />
</template>    

<script setup lang="ts">
import QrcodeVue from "qrcode.vue";
const level = ref("H");
</script>

Got: Type 'string' is not assignable to type 'Level | undefined'..

scopewu commented 1 year ago

Hi, Please upgrade the version to 3.4.1. Now, the type named Level and RenderAs will be export.