One, the scene
Recently, the Dialog component was used in the project, and the el-tabs component was used in the Dialog component. There was no problem when clicking to switch tabs. After clicking to close the Dialog, the browser stuck and was in a crashing state.
Two, cause
After self-checking the reasons and searching on the Internet, there are several situations:
1. The problem of the
el -tab component itself 2. The problem of the vue and element ui version
Three, the solution
1. Remove the content from the el-tab-pane element (no content inside the el-tab-pane element)
2. Add el-row and el-col outside of el-tabs
3. Fix the height of the component
4. The vue version is too low The elment ui version is too high, reduce the elment ui version
Reference: https://github.com/ElemeFE/element/issues/15712