Vue. js component tabs achieves Tab switching

Source: Internet
Author: User
Vue. the js component tabs implements the tab switch effect. Today, I will share with you a vue component written by Xiaoying, because it is not long before Xiaoying can access vue. If there are any shortcomings, I hope you can come up with it, xiao Ying corrected the problem. the following describes how to implement tabs.

Call example:

 
  

0'>

The 11th summit of G20 leaders will be held in Hangzhou, Zhejiang Province from 20 to September 4-5. The theme of the summit is "building an innovative, dynamic, coordinated, and inclusive world economy ". Leaders of G20 members and guests and heads of relevant international organizations will be invited to attend the meeting. The Chinese president will attend and preside over the meeting and attend informal Meeting of BRICS Leaders and other related activities. The G20 Industry and Commerce Summit will be held in Hangzhou, Zhejiang Province from October 1 to 14. The Chinese president will attend the opening ceremony and give a keynote speech. Some G20 members, guests, and heads of relevant international organizations will be invited to attend the meeting.

0'>

Party members and leading cadres

Check the highlights of the Chinese table tennis team in previous Olympic Games. In the semi-finals of the 2016 Rio Olympic table tennis men's team, China's 3-0 South Korea was promoted. Zhang Jike suffered from the tenacious resistance of South Korean teenager Zheng rongzhi. In the case of two lags behind, the five rounds of hard battles were successfully completed. The figure shows the moments of Zhang Jike's wonderful competition.

0'>

It is said that programmers have three treasure: they are stupid, have a lot of money, and die early. Over half of the program "ape" around the blogger took advantage of these three treasures. This shows a problem from the aspect that only rationality is not a good life. Friends should separate work from life to make life more emotional, and make work more rational. It is not quick for the two to come together. KE: the topic is a little too far away. Today, the blogger wrote an article about how to set the select, radio, checkbox, and file styles in css. The simulated box is not involved here, this article only describes how to customize the style in the native environment!

On the morning of July 15, August 16, Beijing time, the Chinese swimming team arrived in Beijing. As soon as they arrived at the exit, they were surrounded by enthusiastic fans, especially popular athletes such as Ning zetao and Fu yuanhui. Image: Visual China

0'>

* Name:

Script import tabs from '. /yezitabs. vue '// introduce the component export default {components: {tabs,}, ready: function () {}, methods :{}, data () {return {tabsShowFlag: true, navTitle: 'News', navData: [{key: 'biubiu', showFlag: 1 ,}, {key: 'doubebean doube', showFlag:-1 ,}, {key: 'singles', showFlag:-1}, {key: 'me ', showFlag:-1}], }},} script

Implement tabs:

 
  

{{navtitle}}

  • =0}' @click='keyShowFun(navindex)'> {{nav.key}}

《script》export default { props: { flag: { type: Boolean, required: true, twoWay: true }, navtitle: { type: String, default: '' }, navdata: { type: Array, required: true, }, }, components: { }, ready: function() { }, methods: { keyShowFun:function(index){ let _this=this; _this.navdata.forEach(function(item){ item.showFlag=-1; }); _this.navdata[index].showFlag=1; } }, data() { return { } },}《script》

:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.