[Vuejs]-Vue background div image does not load

0👍

Although it has been more than 3 years, you may have already solved your problem. I’m writting this answer for other who encounter similar issues. If the solution in the link above does not work for you, I have another suggestion:

<template>
   <div class="" :style="`${background}`">
       <span class="login100-form-title-1">Sign In</span>
   </div>
</template>
<script>
    import background from '~@/assets/imagens/bg-01.jpg'
    export default {
           data() {
                return {
                      background,
                }
           }
    }
</script>

I hope it can be helpful. However, I don’t think it’s suitable because we often store files on the cloud.

I’m sorry if my unhelpful answer wasted your time.

Leave a comment