fix(qrcode): qrcode not displayed properly
fixed: #1026
| | |
| | | </div> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { defineComponent, watch, PropType, ref, unref } from 'vue'; |
| | | import { defineComponent, watch, PropType, ref, unref, onMounted } from 'vue'; |
| | | import { toCanvas, QRCodeRenderersOptions, LogoType } from './qrcodePlus'; |
| | | import { toDataURL } from 'qrcode'; |
| | | import { downloadByUrl } from '/@/utils/file/download'; |
| | |
| | | }); |
| | | } |
| | | |
| | | onMounted(createQrcode); |
| | | |
| | | // 监听参数变化重新生成二维码 |
| | | watch( |
| | | props, |
| | | () => { |
| | | createQrcode() |
| | | createQrcode(); |
| | | }, |
| | | { |
| | | deep: true, |
| | | } |
| | | ) |
| | | ); |
| | | |
| | | return { wrapRef, download }; |
| | | }, |