uni-app——uni-app background-image 绑定变量写法

 <view
    :style="{backgroundImage:'url(' + backgroundImg + ')'}"
  >
  view>
<script>
  export default {
  data() {
   return { 
    // 背景图
      backgroundImg: "@/static/demo.png",}
  },
  }
  script>

你可能感兴趣的:(uni-app,uni-app)