In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how vue uses v-bind to assign values to src and href, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will get something after reading this vue how to use v-bind to assign values to src and href. Let's take a look at it.
V-bind assigns values to src and href
Using v-bind to assign values to src and href is actually very simple, that is, v-bind: attribute name = "name", where name is the key value of json data in data, its abbreviated form is: attribute name = "name".
Example link link1 link2 la la la
Var ve2 = new Vue ({el:'# app', data: {link: "linkyou.html", link1: "https//www.baidu.com", link2: "www.baidu.com", img: '8.jpg'}}) invalid v-bind:src problem
V-bind:src in vue, the picture cannot be displayed properly
I have nothing to click on the code, ready to inspire, do a good project, review vue by the way, and find that when I simulate json data in data, the picture link does not display properly on the page.
Used a variety of methods, can not be used normally, and finally found that the Internet is the need to introduce the problem.
Attach code / / template
/ / scriptdata () {return {/ / Note: after introduction, both relative and absolute paths can use imgLink: require (".. /.. / assets/img/home/recommend_bg.jpg")}. This is the end of the article on "how vue uses v-bind to assign values to src and href". Thank you for reading! I believe you all have a certain understanding of "how vue uses v-bind to assign values to src and href". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.