有问题
html
<view class="file-picker__box jsz" @tap="jszxszUpload('jsz')"></view>
css
.jsz {
background-image: url('../../static/example_drive.png');
}
解决1
html
<view class="file-picker__box jsz" :style="{ 'background-image': 'url('+example_drive+')' }" @tap="jszxszUpload('jsz')"></view>
js
data(){
return {
example_drive: '../../static/example_drive.png'
}
}
解决2
html
<view class="file-picker__box jsz" @tap="jszxszUpload('jsz')"></view>
css
.jsz {
background-image: url('使用base64格式');
}