Home >Web Front-end >uni-app >How to solve uniapp picture error problem
Uniapp image error solution: 1. Use "v-bind require" to solve the problem that the image cannot be loaded; 2. Use the "background-image" attribute to solve the image error problem. The statement is as follows "background-image:url(..);".
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version. This method is suitable for all brands of computers.
Recommended (free): uni-app development tutorial
Solution to the problem that uniapp images cannot be loaded
It is divided into two types
The first one
<image :src="require('../../static/picture')"> //使用v-bind + require
The second one
//第一种可以解决99%的问题,若有1%的没解决,可以使用background-image属性 background-image:url(../../static/picture.png); //使用图片的最好是,本地图片使用背景图,万无一失,网络图片使用image src。
The above is the detailed content of How to solve uniapp picture error problem. For more information, please follow other related articles on the PHP Chinese website!