Home > Web Front-end > uni-app > body text

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

藏色散人
Release: 2020-12-18 17:36:55
Original
23489 people have browsed it

The solution to uniapp local pictures not displaying: first open the corresponding uniapp code file; then change the code "" 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")  
    };  
  },
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template