Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

feat: Add discolorate animation and refactored patch function #63

Merged
merged 2 commits into from
Jun 1, 2024

Conversation

wgxh-cli
Copy link
Collaborator

@wgxh-cli wgxh-cli commented Jun 1, 2024

WARNING!

Must be tested carefully!

Copy link

netlify bot commented Jun 1, 2024

Deploy Preview for newcar-copy failed.

Name Link
🔨 Latest commit 5c291ec
🔍 Latest deploy log https://app.netlify.com/sites/newcar-copy/deploys/665aab2f84308800087e5ed0

Copy link

netlify bot commented Jun 1, 2024

Deploy Preview for newcar-playground failed. Why did it fail? →

Name Link
🔨 Latest commit 5c291ec
🔍 Latest deploy log https://app.netlify.com/sites/newcar-playground/deploys/665aab2f3650b1000832aeb9

Copy link

netlify bot commented Jun 1, 2024

Deploy Preview for newcar-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 5c291ec
🔍 Latest deploy log https://app.netlify.com/sites/newcar-docs/deploys/665aab2f33f16d00089c3e0d

Copy link

netlify bot commented Jun 1, 2024

Deploy Preview for newcar-apis failed. Why did it fail? →

Name Link
🔨 Latest commit 5c291ec
🔍 Latest deploy log https://app.netlify.com/sites/newcar-apis/deploys/665aab2f2054b3000806f0cf

@sheepbox8646 sheepbox8646 self-requested a review June 1, 2024 06:11
@sheepbox8646 sheepbox8646 merged commit 98d9f52 into dromara:main Jun 1, 2024
0 of 17 checks passed
Comment on lines +13 to +18
const changedProps = [
'style.fillColor.red',
'style.fillColor.green',
'style.fillColor.blue',
'style.fillColor.alpha',
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

也许可以考虑让用户传入希望改变的颜色?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

呃,什么意思啊?

Copy link
Collaborator

Choose a reason for hiding this comment

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

需要使用颜色动画的不只是 fillColor,还可能有 borderColor 以及组件自定义的其他颜色选项

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

哦,就是跟颜色相关的东西吧

我想可以给他们重新写几个文件,而不应该在这个函数上再做抽象来增加用户的理解难度

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

以及方便调用 :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

重复写动画实际上有点不合理,因为自定义组件特有的颜色选项是开放的 API(这意味着它可能会是各种莫名其妙的名字),内置的动画泛用性还是应该更强一点(我觉得)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, 我会考虑你的建议,现在我把它修改了,若在实际使用中出现问题再论。

Cheers! :)

Copy link
Member

Choose a reason for hiding this comment

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

你把原来的demo全部复制粘贴上去,然后你就会发现几个问题:

  1. 帧率大大降低
  2. 原来的组件位置都有偏差
    我想这两个漏洞都与你修改了patch有关

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants