element
element copied to clipboard
[Bug Report] When the visible property of the <el-dialog> is set without the.Sync modifier, the closing fork on the upper right corner of the dialog is invalid
Element UI version
1.4.6
OS/Browsers version
windows 7/chrome
Vue version
2.4.4
Reproduction Link
https://jsfiddle.net/xiaodabao/ph15ksbc/3/
Steps to reproduce
点击按钮,再点击dialog的×
What is Expected?
弹窗关闭
What is actually happening?
弹窗未能关闭
Translation of this issue:
Element UI version
1.4.6
OS/Browsers version
Windows 7/chrome
Vue version
2.4.4
Reproduction Link
https://jsfiddle.net/xiaodabao/ph15ksbc/3/
Steps to reproduce
Click the button, and then click dialog *
What is Expected?
Pop off
What is actually happening?
Popups failed to close
设计上就是这样的。
@wacky6 有什么办法可以解决吗,因为有时候这个:visible的属性值可能是从父组件props传递来的,加上.sync属性的话vue会报错。 或许隐藏组件的关闭按钮,自定义一个关闭按钮是个选择?
看下before-close属性,你应该在回调里面修改父组件的值。
问题解决了,通过隐藏关闭按钮然后自定义关闭按钮的方式。 @wacky6 谢谢