1. Loop in Vue
v-for
Common 4 total situations
#First Type<div v-for="item in items"></div> #The second type<div v-for="(item, index) in items"></div> #The third type<div v-for="(val, key) in object"></div> #The fourth type<div v-for="(val, name, index) in object"></div>
For objects, if the index of the normal list array type is empty
2. Delimiter in Vue (modify the difference expression)
delimiters
Give an example
<div > [[ msg }} </div> <script src=""></script> <script> new Vue({ el: '#app', data: { msg: 'message' }, // Modify the interpolation expression symbol delimiters: ['[[', '}}'], both sides symbols are used'symbol' The content of the difference`, `Let's express }) </script>
Summarize
The above is the way to loop and modify the difference expression in Vue introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support for my website!
If you think this article is helpful to you, please reprint it. Please indicate the source, thank you!