Element: [Tabs] How to tell the active tab name

Created on 17 Nov 2016  ·  2Comments  ·  Source: ElemeFE/element

I want to know which tab is active after the user switches a tab. I thought a variable set as :active-name should be changed, but it doesn't change. How can I tell the active tab?

ElementUI version

OS/Browers version

Vue version

Reproduction Link




http://jsfiddle.net/Lkr4Lgdp/

Steps to reproduce

Switch tab

What is Expected?

activeTab is changed, and its tab name is logged to the console

What is actually happening?

The initial tab name is logged every time

Most helpful comment

Try this:

handleClick(e) {
  console.log(e.name)
}

All 2 comments

Try this:

handleClick(e) {
  console.log(e.name)
}

@wdmtech Thank you, it works!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yuchonghua picture yuchonghua  ·  3Comments

smallpath picture smallpath  ·  3Comments

yubo111 picture yubo111  ·  3Comments

akaylh picture akaylh  ·  3Comments

gengxuelei picture gengxuelei  ·  3Comments