Comments (15)
The modal will be closed after two seconds
的意思是 这个窗口两秒后会关掉
,它和窗体改变大小没有关系,是 Demo 本身的逻辑。或者提供一个干净的重现代码看看?
from ant-design.
Hello @WeMadeCode. Please provide a online reproduction by forking codesandbox of [email protected] or [email protected], or provide a minimal GitHub repository. Issues labeled by Need Reproduce
will be closed if no activities in 3 days.
你好 @WeMadeCode,我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击这里创建一个 [email protected] 或 [email protected] 的 codesandbox,或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。
from ant-design.
@zombieJ 你好。我使用本地Demo 未能复现改问题。但是我使用官网复现了改问题。
可以参考下 如下录屏
2024-04-28.09.39.49.mov
from ant-design.
我使用本地Demo 未能复现改问题。但是我使用官网复现了改问题。 可以参考下 如下录屏
@WeMadeCode 业务里你能复现吗,目前我试的只有官网多demo时能复现(把其他 demo 注释掉后,也无法复现)
from ant-design.
@wanpan11 业务里面也能 稳定复现。使用的代码 就是 【Open Modal with async loginc】。但是 我新建Demo 使用【Open Modal with async loginc】 也就无法复现了。不确定 是不是其他代码 其他影响了 这个Modal组件。
from ant-design.
官网是因为缩小后布局改变成一列,右边这个 section 整合到左边这个 section 里了,所以是先卸载(Modal 就没了)再重新 mount 了。你的业务有 bug 应该是你自己的问题。
from ant-design.
@WeMadeCode Modal 本身没问题,官网的 demo 组件每次在屏幕尺寸变化导致 demo 换行的时候就会把 组件卸载掉,https://ant.design/components/modal-cn#components-modal-demo-static-info 用静态方法的就不会,你再检查下你的逻辑撒的
from ant-design.
@WeMadeCode Modal 本身没问题,官网的 demo 组件每次在屏幕尺寸变化导致 demo 换行的时候就会把 组件卸载掉,https://ant.design/components/modal-cn#components-modal-demo-static-info 用静态方法的就不会,你再检查下你的逻辑撒的
@wanpan11 你好,我想继续了解下 【官网的 demo 组件每次在屏幕尺寸变化导致 demo 换行的时候就会把 组件卸载掉】这个动作是 Modal做的,还是官方Demo 主动卸载的?
from ant-design.
这个动作是 Modal做的,还是官方Demo 主动卸载的?
这是官网的行为 与 Modal 自身无关,看下@linxianxi 的回复 他的更清楚一些
from ant-design.
官网是因为缩小后布局改变成一列,右边这个 section 整合到左边这个 section 里了,所以是先卸载(Modal 就没了)再重新 mount 了。你的业务有 bug 应该是你自己的问题。
@wanpan11 是不是父元素(这里是session)尺寸位置的变化导致了 Modal被销毁了?
from ant-design.
是 section 所在的组件卸载了,导致 Modal 也跟着卸载了
from ant-design.
是 section 所在的组件卸载了,导致 Modal 也跟着卸载了
@wanpan11 Modal 直接挂载在 Body 下面的, 其实际直接父元素应该是Body。但是这里却受 理论上的父元素(这里是Session)的销毁影响。这是不是问题?
from ant-design.
组件 和 dom 是不一样,可以看看相关的文章哦~
from ant-design.
是 section 所在的组件卸载了,导致 Modal 也跟着卸载了
@wanpan11 所以 您觉得 【是 section 所在的组件卸载了,导致 Modal 也跟着卸载了】这不是问题 是么?
from ant-design.
section 是人为卸载的 是在预期之中的。
from ant-design.
Related Issues (20)
- Transfer component crashes the app when trying to select item from the right column while it has "unknown-key" within targetKeys HOT 1
- slider tooltip={{ formatter: null }} 隐藏 tooltip 后会有空的 tooltip 出现 HOT 1
- Input disabled 没有红色 border HOT 5
- antd table 的 ExpandedRowRender是一个表单,当默认展开的时候,对表单进行赋值的时候,总是会对最后一个表单赋值。 HOT 2
- resize-observer这个库直接使用findDOMNode导致的 HOT 1
- Tabs组件“更多按钮”无限闪现 HOT 1
- antd tooltip嵌套svg 点击时跳转页面 tooltip会在新页面一直存在 除非刷新 HOT 2
- Form.useWatch 为 undefined 导致页面报错 HOT 3
- SwitcherIconCom 组件不支持自定义loading HOT 2
- List 组件相关,在更新 grid.lg、grid.md 等属性值后,组件没有实时刷新 HOT 1
- ant-design-vue treeselect懒加载的方式,弹窗第一次点开点击父可以懒加载子节点,但是弹窗关闭重新打开之后,之前点击展开的父节点再次点击就不能加载子节点了,为什么? HOT 1
- Popover 滚动到边缘,页面会出现滚动条 HOT 1
- 在某些情况下表头消失 HOT 2
- Date picker dates reset after focus out HOT 2
- DatePicker 在Modal使用,屏幕高度过小时,时间下拉框没遮盖,无法选择 HOT 2
- InputNumber's changeOnWheel props ignored when type is number HOT 7
- select开启labelInValue后,希望把选项属性全部暴露出去或者使用扩展字段保存 HOT 2
- Select tagRender的上下问参数onClose有歧义 HOT 4
- Support for OKLCH color space HOT 2
- Modal 页面打开后会跳到下面去 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-design.