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

fix: Modal组件可拖拽状态下设置宽度为百分比时窗口显示异常 #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jearyt
Copy link

@jearyt jearyt commented Dec 13, 2022

对以下issue中提出的bug进行修复
[Bug Report]Modal组件 可拖拽状态下 设置宽度为百分比时窗口显示异常

问题复现

bug原因
Modal组件在可拖拽状态下,初始化时重复设置了Width属性,因此当宽度设置为固定值时没有错误,而设置为百分比时会将两个百分比相乘作为最终结果
而在窗口位置发生移动时,会将整体宽度设置为100%,此时表现正常

解决方法
由于需要初始化窗口位置,所以保留初始化时对整体宽度的设置,去除窗口宽度设置
在后续窗口位置发生移动时,在将整体宽度设置为100%时同时为窗口补充宽度设置

@sursamer
Copy link

你这解决办法有啥用

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 this pull request may close these issues.

None yet

2 participants