fix(qrcode): qrcode not displayed properly

fixed: #1026
This commit is contained in:
无木 2021-08-03 20:55:40 +08:00
parent 1214b7c32c
commit 26f251e1ed

View File

@ -4,7 +4,7 @@
</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';
@ -93,16 +93,18 @@
});
}
onMounted(createQrcode);
//
watch(
props,
() => {
createQrcode()
createQrcode();
},
{
deep: true,
}
)
);
return { wrapRef, download };
},