ant-design 使用Modal组件报错问题记录

打开modal组件会提示如下报错信息

高版本chrome浏览器会出现这个问题

 

原因是:不能在获得焦点的元素或其祖先上使用 aria-hidden

解决方案:全局添加如下CSS,暂时将Modal中该属性的元素隐藏掉


.ant-modal div[aria-hidden="true"] {display: none !important;}

 

posted @ 2024-10-10 15:48  独寒江雪  阅读(359)  评论(0编辑  收藏  举报