ElemeFE / ElemeFE/element

[Bug Report] el-tabs components default-value will be modified to '0'

Open
#21,459 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.15.5

### OS/Browsers version
win10/chrome95

### Vue version
2.6.11

### Reproduction Link
https://codepen.io/blzbanme/pen/JjyZqPR?editors=1111

### Steps to reproduce
enter "https://codepen.io/blzbanme/pen/JjyZqPR?editors=1111"
click "send" within 10 seconds

### What is Expected?
The window will call "this.$message("there is no open window, don't send to server")",
The pop-up window on the webpage shows "there is no open window, don't send to server"
![image](https://user-images.githubusercontent.com/49187388/141090415-b7e0da27-25aa-4524-bdf2-91f0b03e587d.png)

### What is actually happening?
Because the default value has been modified to "0", the program behavior is wrong.
![image](https://user-images.githubusercontent.com/49187388/141090541-8aacda6d-c92b-4cdf-a45c-848f80719780.png)

I found the code that caused the error,this code is located“element-ui\packages\tabs\src\tabs.vue”,line 176-178.
![image](https://user-images.githubusercontent.com/49187388/141090130-06dd9dc9-ae98-42ef-a12b-88a550d260ce.png)

For what considerations, when el-tab-pane is empty, the default value of el-tabs will be initialized to 0. Should this be stated in the document?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.