Home > Web Front-end > JS Tutorial > body text

Solve the problem that Vue.js 2.0 sometimes fails to bind the img src attribute in two directions

亚连
Release: 2018-05-30 15:14:33
Original
2255 people have browsed it

Below I will share with you an article that solves the problem that Vue.js 2.0 sometimes fails to bind the img src attribute in two directions. It has a good reference value and I hope it will be helpful to everyone.

Incorrect usage:

<img src="http:0.0.0.127/{{item.imgname}}" alt="">
Copy after login

Correct usage:

<img src="&#39;http:0.0.0.127/&#39;+item.imgname" alt="">
Copy after login

When binding attributes, add in front:

The value of the attribute can use expressions, but pay attention to the characters When splicing strings, you must add quotation marks

. The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

Simple example of Vue implementing search and news list functions

##axios sends post request and submits image type Form data method

Using axios method in vue component

The above is the detailed content of Solve the problem that Vue.js 2.0 sometimes fails to bind the img src attribute in two directions. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!