云泥
云泥
@crazylxr useSize 使用 clientWidth/Height 获取的尺寸,只包含 content + padding。是否应该用 offsetWidth/Height 更好(content + padding + scrollbar + border)? https://stackoverflow.com/questions/22675126/what-is-offsetheight-clientheight-scrollheight 其实我感觉,算上 border 更好些,这个 breaking changes 可以下个大版本引入。
或者我觉着 useSize 可以加个参数,指定内部用 `clientXxx/scrollXxx/offsetXxx` 中的哪类 API 来获取尺寸
这个问题我先打上 v4 的标签,等开始开发 v4 时会和团队大佬们讨论,是否有必要做这个改动
添加 options 参数支持后,这个问题应该也会被解决,见 issue:https://github.com/alibaba/hooks/issues/2227
good job
相关 PR 已合并,issue 关了哈
repeat: https://github.com/alibaba/hooks/pull/2063
repeat: https://github.com/alibaba/hooks/pull/2063
done, now closed