ElemeFE / ElemeFE/element

[Bug Report] el-form (label-width = auto) which located in an el-tab will throw an exception when the form before Destroy

Open
#15,775 8 comments 4 reactions 0 assignees View on GitHub
stale
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.8.2

### OS/Browsers version
Any

### Vue version
2.6.10

### Reproduction Link
https://codepen.io/bh20077/pen/NVObdd

### Steps to reproduce
1. Add an el-form in el-tabs, add label-width="auto" on the el-form
2. Make the form destroy. (using v-if or use vue-router to leave current page etc...)
3. the error occurs

.

1. 将 el-form 置于 el-tabs 的某个 el-tab-pane 中。el-form 添加 label-width="auto" 属性。
2. 使 el-form 销毁(通过 v-if,或者 vue-router 路由跳转等方式,总之就是让 el-form 触发 beforeDestroy 方法)
3. 异常发生

### What is Expected?
希望使用 label-width="auto" 时不要发生异常,尝试过使用 label-with="100px" 等方式该异常就不会发生,但是业务中需要使用laebl-with = auto 进行布局

### What is actually happening?
Exception occurs

异常发生了

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.