-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conversation
…and --z-index support
Codecov ReportPatch coverage has no change and project coverage change:
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
☔ View full report in Codecov by Sentry. |
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)', |
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.
不是这样的...
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.
有啥更好的方法呢?
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.
可以这样,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)' |
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.
这个类型提示也没用 就是写死的str
是的,我把它去掉吧,可以不对外暴露
…------------------ Original ------------------
From: Wing ***@***.***>
Date: Tue,Aug 22,2023 11:19 PM
To: ant-design/ant-design-mobile ***@***.***>
Cc: liangsky ***@***.***>, Author ***@***.***>
Subject: Re: [ant-design/ant-design-mobile] fix: (WaterMark) when not set zIndex props, --adm-water-mark-z-index … (PR #6330)
@1587315093 commented on this pull request.
In src/components/water-mark/water-mark.tsx:
> @@ -8,7 +8,7 @@ const classPrefix = `adm-water-mark` export type WaterMarkProps = { gapX?: number gapY?: number - zIndex?: number + zIndex?: number | 'var(--z-index)'
这个类型提示也没用 就是写死的str
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
这样是可以,之前没这样写,css var 里已经有默认值了,也是2000,一样的,我改了
…------------------ Original ------------------
From: 二货爱吃白萝卜 ***@***.***>
Date: Thu,Aug 24,2023 8:07 PM
To: ant-design/ant-design-mobile ***@***.***>
Cc: liangsky ***@***.***>, Author ***@***.***>
Subject: Re: [ant-design/ant-design-mobile] fix: (WaterMark) when not set zIndex props, --adm-water-mark-z-index … (PR #6330)
@zombieJ commented on this pull request.
In src/components/water-mark/water-mark.tsx:
> @@ -31,7 +31,7 @@ const defaultProps = { export const WaterMark: FC<WaterMarkProps> = p => { const props = mergeProps(defaultProps, p) const { - zIndex = 2000, + zIndex = 'var(--z-index)',
可以这样,css var 里改成和 zIndex prop 一样。然后 zIndex prop 默认为空
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
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
fix: #6329