Files
dg-js-workspace/packages/ui-react/note/floating-ui 常见错误.md
T
2026-11-21 22:57:24 +08:00

21 lines
458 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# isValidElement 不通过
通常是 SvgComponent 的属性使用了短横线,而不是驼峰。
# 弹框在页面左上角
mergeProps 里面的 function 函数合并出问题了。
# 点击无反应
没做 【isMounted && 】的判断。
setIsOpen(!isOpen),而不是 setIsOpen(true)。
# hover 不亮
brandRecipe 可能漏了,css 变量没有提供。
# FloatingArrow 箭头位置不对
arrow() 需要位于 offset,shift,flip 之后。