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

fix(sticky): getCurrentInstance在computed中获取不到 #1206

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

LoopZhou
Copy link
Collaborator

@LoopZhou LoopZhou commented Jan 11, 2024

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

1.0.9版本tabs示例无法显示问题排查,发现是sticky组件问题
image

💡 需求背景和解决方案

排查发现是是sticky组件问题。

在1.0.9版本还未锁vue版本时,最新获取的依赖中,sticky组件中 :

const stickyContent = computed(() => renderContent(getCurrentInstance(), 'default', ''));

getCurrentInstance在computed中获取不到了

📝 更新日志

  • fix(Sticky): 修复 getCurrentInstancecomputed 中无法获取元素的问题

  • 本条 PR 不需要纳入 Changelog

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

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

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

Copy link
Contributor

完成

Copy link
Contributor

Size Change: +6 B (0%)

Total Size: 421 kB

Filename Size Change
./dist/tdesign.min.js 132 kB +6 B (0%)
ℹ️ View Unchanged
Filename Size
./dist/reset.css 672 B
./dist/tdesign.css 37.8 kB
./dist/tdesign.js 223 kB
./dist/tdesign.min.css 27.5 kB

@anlyyao anlyyao merged commit ced3cea into develop Jan 15, 2024
10 checks passed
@anlyyao anlyyao deleted the fix/loop-sticky branch January 15, 2024 02:30
@github-actions github-actions bot mentioned this pull request Jan 17, 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