html

<image :src="sceneSrc" mode=""></image>            //图片
<view class="tab"  :style="tabSrc">背景图片</view>    

js

图片image

data(){
         return(){
                sceneSrc:require('../../static/game-scene.png')
         }          
}   

背景图片(添加一个style)

data(){
         return(){
                tabSrc:{
                      backgroundImage: "url(" + require("../../static/yes.png") + ")",
                }
         }          
}      

 

相关文章:

  • 2021-05-21
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案