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

What should I do if uniapp img base64 is not displayed?

藏色散人
Release: 2021-01-18 13:47:04
Original
5711 people have browsed it

uniapp img base64 is not displayed because the string is too long and a carriage return is added during transmission. The solution is to recalculate the length and modify the content to "this.captcha.replace(/[\r \n]/g, "")..." That's it.

What should I do if uniapp img base64 is not displayed?

The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, Dell G3 computer.

Recommended (free): uni-app development tutorial

Specific questions:

uni_app base64 picture display Not displayed?

uni_app The base64 image cannot be displayed, but the src in the image tag actually has a value. I don’t know why?

What should I do if uniapp img base64 is not displayed?

Solution:

This is caused by adding a carriage return in the transmission when the string is too long

computed:{
captchaSrc(){
return this.captcha.replace(/[\r\n]/g, "");
}
},
Copy after login

Just recalculate.

The above is the detailed content of What should I do if uniapp img base64 is 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