vue-qrcode icon indicating copy to clipboard operation
vue-qrcode copied to clipboard

rendering with enable-force-dark and svg tag

Open st4nny opened this issue 2 years ago • 4 comments

Hi, i have this: <VueQrcode class="mx-auto z-30 relative" style="width:230px; height:230px;" :value=qrcode tag="svg" :options="{ width: 230, color: {dark: '#000',light: '#fff'} }"></VueQrcode> with flag enable-force-dark enabled i obtain a white square. Possible solution?

st4nny avatar Oct 17 '21 22:10 st4nny

What's the enable-force-dark meaning? Any online demo for check?

fengyuanchen avatar Oct 22 '21 13:10 fengyuanchen

Hi, Go to chrome://flags/#enable-force-dark on chrome or chromium and enabled dark mode. Go to https://fengyuanchen.github.io/vue-qrcode demo page, the qr generated with svg tag are white.

st4nny avatar Oct 22 '21 13:10 st4nny

  1. It may be a problem with the enable-force-dark mode of the browser.
  2. It may be a problem with the node-qrcode project.
  3. I will suggest you use the img or canvas tag instead currently in enable-force-dark mode.

fengyuanchen avatar Oct 22 '21 13:10 fengyuanchen

Hi, thank you for reply. Some old mobile devices have problem with chrome and rendering with canvas while with svg i don't have problem. I haven't investigate instead with this bug with canvas

st4nny avatar Oct 22 '21 13:10 st4nny