-
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) content 设置空值时,控制台存在错误提示 #6331
Conversation
PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6331.surge.sh |
关联 #6332 |
@@ -131,7 +131,7 @@ export const WaterMark: FC<WaterMarkProps> = p => { | |||
style={{ | |||
zIndex, | |||
backgroundSize: `${gapX + width}px`, | |||
backgroundImage: `url('${base64Url}')`, | |||
backgroundImage: base64Url === '' ? undefined : `url('${base64Url}')`, | |||
}} |
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.
是什么场景会为空呀,content 判断那里?或许应该看content具体设置了什么值进去
然后应该可以setBase64Url那里处理吧
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.
详细见 #6332
后退的页面也会出现404,应该是严重的bug了
空字符串或undefined,或有值时,路由挑转后,默认url的值不存在,控制台就404错误
…------------------ 原始邮件 ------------------
发件人: 咲奈Sakina ***@***.***>
发送时间: 2023年8月22日 21:13
收件人: ant-design/ant-design-mobile ***@***.***>
抄送: liangsky ***@***.***>, Author ***@***.***>
主题: Re: [ant-design/ant-design-mobile] fix: (WaterMark) content 设置空值时,控制台存在错误提示 (PR #6331)
@1587315093 commented on this pull request.
In src/components/water-mark/water-mark.tsx:
> @@ -131,7 +131,7 @@ export const WaterMark: FC<WaterMarkProps> = p => { style={{ zIndex, backgroundSize: `${gapX + width}px`, - backgroundImage: `url('${base64Url}')`, + backgroundImage: base64Url === '' ? undefined : `url('${base64Url}')`, }}
是什么场景会为空呀,content 判断那里?或许应该看content具体设置了什么值进去
然后应该可以setBase64Url那里处理吧
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
这个希望先看下(页面后退的页面也会出现404应该是严重的bug了) $ yarn |
@zombieJ : 有空看下这个问题,review下代码,目前临时使用pnpm patch 处理项目了 |
这个问题有人看吗? |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #6331 +/- ##
==========================================
- Coverage 91.56% 91.56% -0.01%
==========================================
Files 306 306
Lines 6592 6591 -1
Branches 1627 1627
==========================================
- Hits 6036 6035 -1
Misses 521 521
Partials 35 35
☔ View full report in Codecov by Sentry. |
看了一下是初始状态时为空导致 |
fix: #6332
content 设置空值时,background-image: url("");
控制台存在错误提示: 加载404,但不影响使用
content 设置不是空值时,渲染时,也会先渲染background-image: url("");也存在控制台错误提示问题