Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Docs/progress 修复首次进入时与设置的stroke-width的延迟显示和兼容性问题 #3133

Closed
wants to merge 3 commits into from

Conversation

huxinhai
Copy link
Collaborator

@huxinhai huxinhai commented Sep 9, 2024

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

💡 需求背景和解决方案

背景: 在使用progress组件时 当小程序首次进来的时候 会出现外部设置了stroke-width 但是在最开始的时候还是能看到组件本身的默认值 要等一小会才会更新视图 虽然说理论上都要先做单位转换, 直接*2 除了375的屏幕,其他屏幕下会有出入 #但是我觉得起码这样可以先解决大问题😄😄

📝 更新日志

  • fix(Progress): 修复环形进度条首次加载时,strokeWidth 线宽延迟显示的问题

  • 本条 PR 不需要纳入 Changelog

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

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

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

src/image/image.wxml Show resolved Hide resolved
src/progress/progress.ts Outdated Show resolved Hide resolved
@anlyyao
Copy link
Collaborator

anlyyao commented Sep 10, 2024

@huxinhai 这个场景 方便提供录屏👀👀吗

src/progress/progress.ts Outdated Show resolved Hide resolved
@@ -80,7 +80,7 @@
>
<view
class="{{classPrefix}}__canvas--inner {{prefix}}-class-bar"
style="{{innerDiameter? 'width:'+ innerDiameter*2 + 'rpx;' + 'height:'+ innerDiameter*2 + 'rpx;': ''}}"
style="{{strokeCircleWidth? '--td-progress-stroke-circle-width:'+ strokeCircleWidth : ''}}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

style="{{heightBar? '--td-progress-stroke-circle-width:' + heightBar + 'px': ''}}"

Copy link
Collaborator

Choose a reason for hiding this comment

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

getInnerDiameter() 可以整段移除了

@anlyyao
Copy link
Collaborator

anlyyao commented Sep 10, 2024

改完之后要更新快照文件

@huxinhai
Copy link
Collaborator Author

/update-snapshot

1 similar comment
@anlyyao
Copy link
Collaborator

anlyyao commented Sep 11, 2024

/update-snapshot

@anlyyao
Copy link
Collaborator

anlyyao commented Sep 11, 2024

Duplicate of #3139

@anlyyao anlyyao marked this as a duplicate of #3139 Sep 11, 2024
@github-actions github-actions bot added the duplicate This issue or pull request already exists label Sep 11, 2024
@github-actions github-actions bot closed this Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants