No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. cclain
    3. Posts
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 0
    • Groups 0

    Posts made by cclain

    • RE: q-carousel with v-for

      I have finally resolved my problem you need to use require like that
      {
      id: 1,
      url: require(‘src/assets/1.jpeg’)
      },

      posted in Help
      C
      cclain
    • RE: q-carousel with v-for

      @s-molinari
      Thanks for the advice,
      but that doesn’t work,
      as I read in the documentation I need to use required :
      (relative path format): src=“require (’. /my_img.jpg’)”

      posted in Help
      C
      cclain
    • q-carousel with v-for

      Hi, I’m new in quasar and i’m trying to use a carousel to show some images in static repository, and i having problems to use v-for directive with q-carousel-slide.

      so i start with a simple

            <q-carousel-slide
            v-for="(image) in images"
            :key="image.id"
            :name="image.id"
            img-src="../statics/myImage.jpeg"
            />
      

      and it’s ok, for each image in images i see the same image.

      next i wanna print each image in carousel, so i use this:

            <q-carousel-slide
            v-for="(image) in images"
            :key="image.id"
            :name="image.id"
            :img-src="require(image.url)"
            />
      

      and i have the following error :

      [Vue warn]: Error in render: "Error: Cannot find module '../statics/1.jpeg'"
      

      ( my data :

      images: [
              {
                id: 1,
                url: '../statics/1.jpeg'
      
              }
          ]
      

      )
      I have already read this topic : https://forum.quasar-framework.org/topic/5768/carousel-with-v-for?_=1595405298650

      did i forgot something ?

      posted in Help
      C
      cclain