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

fix: (WaterMark) when not set zIndex props, --adm-water-mark-z-index … #6330

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

liangskyli
Copy link
Contributor

fix: #6329

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (8a3f426) 91.56% compared to head (f0d3d96) 91.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6330      +/-   ##
==========================================
- Coverage   91.56%   91.56%   -0.01%     
==========================================
  Files         306      306              
  Lines        6592     6591       -1     
  Branches     1627     1626       -1     
==========================================
- Hits         6036     6035       -1     
  Misses        521      521              
  Partials       35       35              
Files Changed Coverage Δ
src/components/water-mark/water-mark.tsx 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Contributor

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6330.surge.sh

@@ -31,7 +31,7 @@ const defaultProps = {
export const WaterMark: FC<WaterMarkProps> = p => {
const props = mergeProps(defaultProps, p)
const {
zIndex = 2000,
zIndex = 'var(--z-index)',
Copy link
Contributor

Choose a reason for hiding this comment

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

不是这样的...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

有啥更好的方法呢?

Copy link
Member

Choose a reason for hiding this comment

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

可以这样,css var 里改成和 zIndex prop 一样。然后 zIndex prop 默认为空

@@ -8,7 +8,7 @@ const classPrefix = `adm-water-mark`
export type WaterMarkProps = {
gapX?: number
gapY?: number
zIndex?: number
zIndex?: number | 'var(--z-index)'
Copy link
Contributor

Choose a reason for hiding this comment

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

这个类型提示也没用 就是写死的str

@liangskyli
Copy link
Contributor Author

liangskyli commented Aug 23, 2023 via email

@liangskyli
Copy link
Contributor Author

liangskyli commented Aug 24, 2023 via email

@zombieJ zombieJ merged commit dd02e14 into ant-design:master Aug 25, 2023
8 checks passed
cytle pushed a commit to cytle/ant-design-mobile that referenced this pull request Sep 11, 2023
ant-design#6330)

* fix: (WaterMark) when not set zIndex props, --adm-water-mark-z-index and --z-index support

* refactor: (WaterMark) zIndex type remove 'var(--z-index)'

* refactor(FloatingBubble): zIndex props default undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WaterMark 水印 全局变量--adm-water-mark-z-index 和CSS 变量--z-index失效
4 participants