Vue项目中设置背景图片

<template>
  <div class="login-wrap" :style="setBackground">
  </div>
</template>
<script>
 export default {
   data () {
     return {
       setBackground: {
          backgroundImage: "url(" + require("_/assets/login_bgx.gif") + ")",
          backgroundRepeat: "repeat"
       }
     }
   }
 }
</script>
Logo

前往低代码交流专区

更多推荐