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

    Dynamic image error (v-for list)

    Help
    1
    3
    604
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      XopoIII last edited by XopoIII

      hi, i have problem.

      working:

      data () {
        return {
          aImg: 'statics/images/aimg.svg'
        }
      }
      <div>
            <img :src="aImg" />
      </div>
      

      does not work:

      data () {
        return {
          aImg: 'statics/images/aimg.svg'
        }
      }
      <div>
          <div
            v-for="aa in aas"
            :key="aa.id"
          >
            <img :src="aa.image" /> // Not this
            <img :src="aImg" /> // Not this
            <span>{{ aa.name }}</span>
          </div>
      </div>
      

      everything works on dev, but on build no
      what am I doing wrong?

      Build mode… cordova
      Quasar theme… mat
      Quasar CLI… v0.17.13
      Quasar Framework… v0.17.10

      1 Reply Last reply Reply Quote 0
      • X
        XopoIII last edited by

        tried to change path, do not help any: assets whith ~,@,/,./ or statics with ~,@,/,./ or required(path)

        😞

        1 Reply Last reply Reply Quote 0
        • X
          XopoIII last edited by

          found a solution

          required('src/statics/images/aimg.svg')
          
          1 Reply Last reply Reply Quote 2
          • First post
            Last post