Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(affix): affix complete🎉 #75

Merged
merged 5 commits into from
Jul 16, 2024
Merged

Conversation

601odd
Copy link
Contributor

@601odd 601odd commented Jul 6, 2024

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

#32

💡 需求背景和解决方案

📝 更新日志

  • feat(affix): affix complete🎉

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@duenyang duenyang self-requested a review July 8, 2024 03:21

static propsType = {
children: Object,
container: Object,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看类型应该是 [String, Function]

static defaultProps = { container: () => window, offsetBottom: 0, offsetTop: 0 };

static propsType = {
children: Object,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

类型应为[String, Number, Object, Function]

static propsType = {
children: Object,
container: Object,
content: Object,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

children

Comment on lines 25 to 29
innerOffsetTop = signal(0);

inneroffsetBottom = signal(0);

innerZIndex = signal(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这几个被signal的变量并没有在render中使用,直接改成普通变量应该可以实现,signal的话会带来不必要的性能损耗

Comment on lines 35 to 39
scrollContainer = createRef<ScrollContainerElement>();

placeholderEL = createRef<HTMLElement>();

ticking = createRef<boolean>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,确认下是否必须要使用ref,直接this.scrollContainer访问应该可以

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@duenyang
Copy link
Contributor

需要处理下冲突

@duenyang duenyang merged commit d2515b4 into TDesignOteam:main Jul 16, 2024
1 check passed
This was referenced Oct 17, 2024
This was referenced Dec 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants