Element UI version
2.15.3
OS/Browsers version
chorm
Vue version
2.6.14
Reproduction Link
https://elementui.github.io/issue-generator/#/zh-CN
Steps to reproduce
111222
<el-button size="mini" plain type="primary" @click="fieldOptionModelVisible = false">取消
<el-button size="mini" type="primary" @click="fieldOptionModelVisible = false">确定
What is Expected?
能正常操作
What is actually happening?
关闭时,页面崩溃
3条答案
按热度按时间5ssjco0h1#
Translation of this issue:
Element UI version
2.15.3
OS/Browsers version
chorm
Vue version
2.6.14
Reproduction Link
https://elementui.github.io/issue-generator/#/zh -CN
Steps to reproduce
<el-dialog
:visible.sync="fieldOptionModelVisible"
Title = "field permission editor"
custom-class="fieldOptionModel"
width="600px"
append-to-body destroy-on-close>
<el-tab-pane
v-for="tab in tabsData"
:key="tab.tableId"
:label="tab.tableName"
:name="tab.tableId">
< El form item label = "activity name" >
< El form item label = "activity nature" >
< El checkbox button label = "push activity" name = "type" > < / El checkbox button >
< El checkbox button label = "offline theme activity" name = "type" > < / El checkbox button >
< El button size = "mini" plain type = "primary" @ Click = "fieldoptionmodel visible = false" > cancel < / El button >
< El button size = "mini" type = "primary" @ Click = "fieldoptionmodelvisable = false" > confirm < / El button >
What is Expected?
It can operate normally
What is actually happening?
When closed, the page crashes
sf6xfgos2#
遇到同样的问题了
Element UI version
2.13.2
OS/Browsers version
edge
Vue version
2.6.11
wi3ka0sx3#
For solutions Vue 2.6+, wrap a layer of template in el-tab-pane to specify slot as default .
Below Vue 2.6, v-if is added to el-tabs, which is destroyed when the dialog is closed
An analysis of the issue in a Chinese blog