" Just change it to "image"."/> " Just change it to "image".">

Home  >  Article  >  Web Front-end  >  How to solve the problem that local pictures in uniapp are not displayed

How to solve the problem that local pictures in uniapp are not displayed

藏色散人
藏色散人Original
2020-12-18 17:36:5523487browse

The solution to uniapp local pictures not displaying: first open the corresponding uniapp code file; then change the code "0bafabe48fe08cf107e8be0425d72da9" just change "img" to "image".

How to solve the problem that local pictures in uniapp are not displayed

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

Specific questions:

uni-app’s image component, Local images are not displayed

image uniapp
<img src="../../static/img/seek/add.png" />  
<img :src="icon" />
data() {  
    return {  
      icon: require("../../static/img/home/setting.png")  
    };  
  },

are not displayed, they are all sub-components

2.6.8 HBuilder is ok

2.7 and above is not ok

echarts It is also not supported above 2.7

Do I need to configure anything additional?

I saw a post before that said (just change the image path of the child component to the same path as the image of the parent component.)

This is very impractical, require even packaging All failed

Solution:

img is changed to image!

The above is the detailed content of How to solve the problem that local pictures in uniapp are not displayed. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn