html:
html
<view class="toubu" :style="{backgroundImage:'url(' + bjimg + ')'}">
</view>
js:
javascript
<script>
export default {
data() {
return {
bjimg: '../../static/img/qianbao.png'
}
},
onLoad() {
},
methods: {
}
}
</script>
css
css
.toubu {
width: 700rpx;
height: 360rpx;
border-radius: 15rpx;
background-size: cover;
background-position: center;
}