-
Notifications
You must be signed in to change notification settings - Fork 143
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
feat(comp: watermark): add watermark component (#924) #930
Conversation
This preview will be available after the AzureCI is passed. |
Codecov Report
@@ Coverage Diff @@
## main #930 +/- ##
==========================================
- Coverage 93.38% 92.98% -0.40%
==========================================
Files 679 727 +48
Lines 66670 68392 +1722
Branches 5888 5892 +4
==========================================
+ Hits 62261 63597 +1336
- Misses 4409 4795 +386
Continue to review full report at Codecov.
|
063676b
to
0fd8b08
Compare
// low is default | ||
|
||
case 'mid': | ||
width /= 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
尽可能避免直接给参数进行赋值操作。
另外建议这里抽象成一个数据表, 会让你的代码灵活很多,后续也可以考虑让用户自定义这个数据表,做到可配置。
const densityMap = {
low: {width:1, height:1, ...},
mid:{...},
heght:{...}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其实是有对应参数开放的,只需要调节参数就行,数据表做不到数据的动态调整吧
在 PR 里关联一下对应的 issue 就好,没必要在把 API 设计贴过来了。 |
PR Checklist
Please check if your PR fulfills the following requirements:
What is the current behavior?
What is the new behavior?
#924
Other information