Home  >  Article  >  Web Front-end  >  How to switch tabs in Vue2 tab

How to switch tabs in Vue2 tab

php中世界最好的语言
php中世界最好的语言Original
2018-03-10 13:53:123087browse

This time I will bring you the method of switching tabs with Vue2 tab. What are the precautions when using Vue2 tab to switch tabs. The following is a practical case, let’s take a look.

I've been learning Vue recently. After looking at the case, I just did a practice to deepen my understanding. This kind of simple and effective effect is more acceptable;

html: The structure is very simple ; -for traversal order value-key;

Point 2: Regarding the use of global API Vue.set();; it should be called with this.$set after the loop in the change method;

Here I use a tips about how to update the value of the Active status after changing,

Add one item behind it. Vue knows;

Point 3: How to reference the component component is:who; send it to a func attribute traversed by v-for; this is convenient;

In fact, writing another variable under data to store com1 com2 com3 will not take effect;

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website!

Related reading:

How to solve the css Hack of IE11

How VUE uses anmate.css3

How axios makes HTTP request client based on Promise

The above is the detailed content of How to switch tabs in Vue2 tab. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The 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.cn