This time I will bring you how to implement vue tagAttributesData bindingand splicing, how to implement vue tag attribute data binding and splicingNotesWhat are they? Here are actual cases. Let’s take a look.
After scanning the documents on the vue official website, I started to write the website project. There was no design, so I found an h5 winning software website on Baidu and copied it. It was a bit broken when I thought about it. Then change the content.
First start making a list display
After the vue instance is created, add default data to the object and the list is loaded successfully. Check out the source code to see if it's what you had in mind. Currently, we only display the initialized default array. The operations and jumps in the list have not been added yet. Try adding the id field and number to the initialized array
and refresh it. It has no effect. It’s a rip-off of Chrome. The cache is particularly serious and I have to clear the cache or force refresh. vue made an error in the console, saying that the {{id}}# of the a tag content (Article 1) ##Grammar error, I checked the document and there was no similar example, so I started to try to rewrite it based on my own experienceAfter a while, I found that it was not ideal. It seemed that the document was not read carefully enough. , it is necessary to pound it in a targeted manner. When I saw that the class and style of the tag were bound, I saw that there was object syntax and array syntax. Without further ado, I first wrote the object writing method into the a tag, refreshed to see the effect, and found that the href of the a tag was like detail/[
objectobject], I laughed.
安全and see how others write it. I find that what I wrote is too bloody.
Let’s start with part of the code.{{item.Name}} Copy after loginData block codeThe next step is to use Ajax to request server data. It is impossible to always use initialization and default data I believe you have read the case in this article You have mastered the method. For more exciting information, please pay attention to other related articles on the php Chinese website! Recommended reading:var vm = new Vue({ el: '#section-strategies', data: { parentMessage: 'Parent', StrategyCnt:0, Strategys: [{id:1,name:'文章1'},{id:2,name:'文章2'}] } })Copy after loginHow to modify create-react-app to support multiple pages
without using select How to implement the drop-down box function in vue under this situation
The above is the detailed content of How to implement vue tag attribute data binding and splicing. For more information, please follow other related articles on the PHP Chinese website!
Related labels:source:php.cnPrevious article:jQuery+Cookie implements skin switching function Next article:How to use JS to determine whether a variable existsStatement of this WebsiteThe 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.cnLatest Articles by Author
2018-06-11 11:57:34 2018-06-15 15:55:18 2018-06-15 15:49:00 2018-06-15 15:46:15 2018-06-15 15:42:38 2018-06-15 15:40:34 2018-06-15 15:39:32 2018-06-15 15:37:14 2018-06-15 15:34:21 2018-06-15 15:22:51Latest IssuesRelated TopicsMore>
Introduction to article tag attributes
How to bind data in dropdownlist
The difference between fprintf and printf
What is the role of kafka consumer group
How to recover browser history on computer
How to solve the problem of slow server domain name transfer
How is the performance of php8?
Reasons why website access prompts internal server error
Popular RecommendationsPopular TutorialsMore>
![]()
![]()
JAVA Beginner's Video Tutorial2350946![]()
Latest DownloadsMore>
- About us Disclaimer Sitemap
- php.cn:Public welfare online PHP training,Help PHP learners grow quickly!