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] Drawer, a new component, has a small problem: the default value of the appendToBody attribute in the document is false, but the default value in the code is true, the modal-append-to-body attribute in the document is not working well, it seems that the props in the code is not received. #16783

Closed
Minions51390 opened this issue Jul 29, 2019 · 8 comments · Fixed by #16953

Comments

@Minions51390
Copy link

Element UI version

2.11.1

OS/Browsers version

Chrome 69.0.3497.92

Vue version

2.6.10

Reproduction Link

https://codepen.io/minions51390/pen/aepEpj

Steps to reproduce

点击按钮,设置modal-append-to-body属性为false后发现dom依然被append到了body里面,
这个链接里面我没有设置append-to-body属性,按照文档上说明append-to-body默认值为false,那么drawer的dom应该被append到class名为drawer-wrapper的div下面但是依旧被append到body下面。

What is Expected?

设置modal-append-to-body属性为false后,dom会被添加到Drawer 的父元素上。
不设置append-to-body属性,dom会被添加到Drawer 的父元素上。

What is actually happening?

modal-append-to-body属性好像没有生效。
不设置append-to-body属性,dom会被添加body上面。

@element-bot element-bot changed the title [Bug Report] 新的组件Drawer有一丢丢小问题:文档中介绍appendToBody属性默认值写的是false,但是代码中默认值是true,文档中介绍的modal-append-to-body属性不好用,看起来是代码中props没有接收 [Bug Report] Drawer, a new component, has a small problem: the default value of the appendToBody attribute in the document is false, but the default value in the code is true, the modal-append-to-body attribute in the document is not working well, it seems that the props in the code is not received. Jul 29, 2019
@element-bot
Copy link
Member

Translation of this issue:

Element UI version

2.11.1

OS/Browsers version

Chrome 69.0.3497.92

Vue version

2.6.10

Reproduction Link

Https://codepen.io/minions 51390/pen/aepEpj

Steps to reproduce

Click on the button and set the modal-append-to-body attribute to false. It is found that the DOM is still append to the body.

In this link, I did not set the append-to-body attribute. According to the document, the default value of append-to-body is false. Then the drawer's DOM should be append to the div named drawer-wrapper, but still append to the body.

What is Expected?

When the modal-append-to-body attribute is set to false, DOM is added to the parent element of Drawer.
Without setting the append-to-body attribute, DOM is added to the parent element of Drawer.

What is actually happening?

The modal-append-to-body attribute does not seem to be in effect.

Without setting the append-to-body attribute, DOM will be added to the body.

@cuevven
Copy link

cuevven commented Jul 30, 2019

The modal and modal-append-to-body attributes don't work.

@ziyoung
Copy link
Contributor

ziyoung commented Jul 31, 2019

@JeremyWuuuuu 看一下。

@jw-foss
Copy link
Contributor

jw-foss commented Jul 31, 2019

@ziyoung Got it.

@jw-foss
Copy link
Contributor

jw-foss commented Jul 31, 2019

@Minions51390 @cuevven It's a bug, which will be fixed @ next release. I am so sorry for the bug.

@Minions51390
Copy link
Author

@JeremyWuuuuu 辛苦修复,超喜欢elementUI,很棒很棒的组件库~

@jw-foss
Copy link
Contributor

jw-foss commented Jul 31, 2019

@Minions51390 感谢!

@jw-foss
Copy link
Contributor

jw-foss commented Aug 8, 2019

#16953
You can watch this PR to track the process.
PR 已提

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

Successfully merging a pull request may close this issue.

5 participants