element icon indicating copy to clipboard operation
element copied to clipboard

[Bug Report] el-tab-pane v-show not taking effect

Open runjia1987 opened this issue 9 years ago • 5 comments

Element UI version

1.4.3

OS/Browsers version

Ubuntu 16.04 Chrome 58.0.3029.81 x64

Vue version

2.4.2

Reproduction Link

http://jsfiddle.net/smwnf4nm/1/

Steps to reproduce

run

What is Expected?

third pane be hidden.

What is actually happening?

third pane is not hidden when v-show returns false.

runjia1987 avatar Sep 19 '17 06:09 runjia1987

Just like el-table-column, you need to use v-if to control el-tab-pane's visibility.

Leopoldthecoder avatar Sep 19 '17 07:09 Leopoldthecoder

@Leopoldthecoder Hi, I'm new to Vue and ElementUI. After I use v-if, I got error in console, which shows [Vue warn]: Duplicate keys detected: 'tab-7'. This may cause an update error. As I use el-tab in many places, these errors disturb me from my normal debug. Could you plz give some suggestions?

HJWAJ avatar Jan 04 '19 12:01 HJWAJ

Thanks for your work about Element. I think it's better if there are some docs about this issue on the official website.😄 @Leopoldthecoder

remones avatar Mar 01 '19 07:03 remones

@HJWAJ is there any solution?

wenweih avatar Jul 19 '19 04:07 wenweih

@Leopoldthecoder Hi, I'm new to Vue and ElementUI. After I use v-if, I got error in console, which shows [Vue warn]: Duplicate keys detected: 'tab-7'. This may cause an update error. As I use el-tab in many places, these errors disturb me from my normal debug. Could you plz give some suggestions?

You need to add a unique key attribute to el-table-column where you use v-if

Lesty612 avatar Aug 04 '20 03:08 Lesty612