What is the function of Key
- As long as Key is for more efficient virtual Dom, the principle is that Vue can accurately judge whether two nodes are the same through Key during the patch process, so as to avoid frequent updating of different elements and make the whole patch process more efficient, reduce the amount of Dom operation and improve performance
2. If the key is not set, it may cause some hidden bugs when the list is updated
3. Vue also uses the key attribute when transitioning between elements with the same label name, in order to distinguish between them. Otherwise, VUE will only replace its internal attribute without transition effect