v-for="i in 3
时间: 2024-04-25 16:25:02 浏览: 41
根据引用\[1\]和引用\[2\]的内容,v-for在优先级上高于v-if。因此,在v-for循环中,v-if会在每次循环中都执行一次。所以,v-for="i in 3"会生成3个节点。
#### 引用[.reference_title]
- *1* [v-if与v-for](https://blog.csdn.net/weixin_45832482/article/details/123024449)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [v-for和v-if](https://blog.csdn.net/qq_40713392/article/details/85926263)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文