Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] MessageBox Bullet Box - Distinguishing Cancellation from Closing #15395

Closed
huhongyin opened this issue May 5, 2019 · 1 comment
Assignees
Milestone

Comments

@huhongyin
Copy link

Element UI version

2.8.2

OS/Browsers version

deepin

Vue version

2.6.10

Reproduction Link

https://codepen.io/pen/?&editable=true

Steps to reproduce

默认情况下,当用户触发取消(点击取消按钮)和触发关闭(点击关闭按钮或遮罩层、按下 ESC 键)时,Promise 的 reject 回调和callback回调的参数均为 'cancel'。如果将distinguishCancelAndClose属性设置为 true,则上述两种行为的参数分别为 'cancel' 和 'close'。
文档中说触发关闭(点击关闭按钮或遮罩层、按下esc按钮)行为参数是close,但是按下esc键行为参数仍然为cancel

What is Expected?

期待和文档中一致的行为参数

What is actually happening?

实际行为参数为cancel

@element-bot element-bot changed the title [Bug Report] MessageBox弹框-区分取消与关闭 [Bug Report] MessageBox Bullet Box - Distinguishing Cancellation from Closing May 5, 2019
@element-bot
Copy link
Member

Translation of this issue:

Element UI version

2.8.2

OS/Browsers version

Deepin

Vue version

2.6.10

Reproduction Link

Https://codepen.io/pen/?&editable=true

Steps to reproduce

By default, when the user triggers cancel (click cancel button) and close (click close button or mask layer, press ESC key), the reject callback and callback callback parameters of Promise are'cancel'. If the distinguishCancelAndClose property is set to true, the parameters of the above two behaviors are'cancel'and'close', respectively.

The document says that the action parameter of triggering closure (clicking the closing button or the mask layer, pressing the ESC button) is close, but the action parameter of pressing the ESC button is cancel.

What is Expected?

Expectation and Document Consistent Behavior Parameters

What is actually happening?

The actual behavior parameter is cancel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants