Giter Site home page Giter Site logo

Nuxt 3 support about vue-qr HOT 9 OPEN

waysagency avatar waysagency commented on June 2, 2024
Nuxt 3 support

from vue-qr.

Comments (9)

waysagency avatar waysagency commented on June 2, 2024 1

Alright I've got it working now. Had to add the package to build.transpile.

// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
  build: {
    transpile: ["vue-qr", "@diadal/vue3-qr-code-styling"],
  },
});

But now I have some issues with the appearence of the qr code.

Here is my code

<script setup lang="ts">
import vueQr from "vue-qr/src/packages/vue-qr.vue";

const ComponentOptions = reactive({
  data: {
    scale: 1,
  },
  timing: {
    scale: 1,
    protectors: true,
  },
  alignment: {
    scale: 0.5,
    protectors: true,
  },
  cornerAlignment: {
    scale: 0.5,
    protectors: true,
  },
});
</script>

<template>
  <div>
    <ClientOnly>
      <vueQr text="https://test.nl/" :size="500" :components="ComponentOptions"></vueQr>
    </ClientOnly>
  </div>
</template>

And this is what it looks like

image

from vue-qr.

Binaryify avatar Binaryify commented on June 2, 2024

plz use <client-only><vue-qr></vue-qr></client-only> instead

from vue-qr.

waysagency avatar waysagency commented on June 2, 2024

I don't get the window error anymore. Even without the client-only. But I do get this error now.

image

<script setup>
import vueQr from "vue-qr/src/packages/vue-qr.vue";
</script>

<template>
  <div>
    <client-only><vue-qr></vue-qr></client-only>
  </div>
</template>

from vue-qr.

Binaryify avatar Binaryify commented on June 2, 2024

But now I have some issues with the appearence of the qr code.

what issues you mean

from vue-qr.

waysagency avatar waysagency commented on June 2, 2024

Look at the bottom right square. There are the small squares smaller then the rest of the squares. Don't think this is normal behaviour

from vue-qr.

Binaryify avatar Binaryify commented on June 2, 2024

plz set cornerAlignment's scale to 1

from vue-qr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.