


How to solve the problem of red and warning when using v-for in vue (detailed tutorial)
Jun 01, 2018 pm 03:30 PMBelow I will share with you an article based on vue that solves the problem of red reporting and warning when using v-for. It has a good reference value and I hope it will be helpful to everyone.
Code red reporting is very uncomfortable for patients with obsessive-compulsive disorder who pursue beautiful code. The red reporting is as follows:
There will also be prompts like
1 |
|
in the console. To solve this problem of red reporting, we need to cycle according to his prompts. When adding a unique key, choose to use index here:
1 2 3 4 5 6 7 8 9 |
|
In this way, the red report disappears.
The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.
Related articles:
How to customize the player based on vue-video-player
Vue encapsulates a simple and lightweight Examples of a large number of upload file components
Implementing a lucky draw page based on JavaScript
##
The above is the detailed content of How to solve the problem of red and warning when using v-for in vue (detailed tutorial). For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Tips for using v-for to implement dynamic sorting in Vue

Detailed explanation of v-for function in Vue3: perfect solution to list data rendering
![How to solve '[Vue warn]: v-for='item in items': item' error](https://img.php.cn/upload/article/000/000/164/169241709258603.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
How to solve '[Vue warn]: v-for='item in items': item' error

Best practices and performance optimization methods for using v-for in Vue

Which one has higher priority, v-if or v-for in vue?

v-for function in Vue3: perfect solution to list data rendering

Vue error: Unable to use v-for instruction correctly, how to solve it?

How to use v-for instruction to loop output objects in Vue
