一、react+antd
1、Firefox浏览器使用antd4的组件select、popover等应用poper.js组件会报错
📌 问题现象
📌 解决办法
方法一:引入第三方插件InstanceofPlugin。插件相关地址:InstanceofPlugin | 无界 Polyfill
import { InstanceofPlugin } from "wujie-polyfill";
<WujieReact
width="100%"
height="100%"
name="react16"
url={react16Url}
sync={!path}
props={props}
plugins={[
InstanceofPlugin(),
]}
></WujieReact>
📌 问题原因
盲猜是火狐浏览器获取dom方式的原因
2、chrome浏览器使用antd4的组件popover、tooltip等应用poper.js的组件,被基座的dom遮挡(不兼容火狐浏览器)
📌 问题现象
📌 解决办法
方法一:使用antd中的getPopupContainer
将select挂载在想显示的父节点下面。
在 Ant Design 中,getPopupContainer
是很多组件(如 Tooltip
、Popover
等)的属性。