vuejs v-html image tag not resolving src

前端 未结 2 1880
梦谈多话
梦谈多话 2021-01-28 18:23

I have a vue page which uses v-html to place an html content inside a

as follows:

相关标签:
2条回答
  • 2021-01-28 18:43

    It seems perfect only.

    I have implemented the same way to fetch the image, Here I can see the image. Please check the path once again.

    You can check below example where I have tried to implement same way :http://jsfiddle.net/suprabhasupi/eywraw8t/491005/

    0 讨论(0)
  • 2021-01-28 18:44

    The issue is in the src url you are using, the src url root is the public directory.

    For example, if you have all your images in public->images directory then your code will look like this:

    this.noDataMessage = "<img src='images/Myfav_empty.png' width='35px' height='35px'>";
    
    0 讨论(0)
提交回复
热议问题