antdv1.7.8踩坑记录
1、a-select 下拉框不随页面滚动
解决方案:
:getPopupContainer="(triggerNode)=>{return triggerNode.parentNode}"
getPopupContainer:菜单渲染父节点,默认渲染到 body 上。
2、a-select下拉框未顶部/底部对其:
解决方案:
增加a-select父级容器高度,默认会顶部对其或底部对其,当高度不够时,就会出现上面的处于输入框中间的情况。
3、a-button按钮的shape属性
shape="circle"
当设置为circle和
round时,未按照预期显示,审查元素发现button标签上有element.style { margin: 0px; border-radius: 0px; }}。
待解决。
4、a-form-model 多重嵌套时,验证未自动触发
将表单结构拆成多个文件,包括a-form-model、a-row、a-form-model-item、component、a-input。component实现了表单内容的动态渲染,
但是也拦截了表单组件的事件,需要将a-input的失去焦点等事件,经过component传递给父级组件a-form-model-item