-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: 使用innerHTML赋值后转小程序时,a标签转view标签+img转image标签时,把width和height写入style属性 #16780
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.x #16780 +/- ##
==========================================
- Coverage 56.51% 56.45% -0.07%
==========================================
Files 500 500
Lines 22765 22799 +34
Branches 5652 5644 -8
==========================================
+ Hits 12866 12871 +5
- Misses 8693 8718 +25
- Partials 1206 1210 +4
Flags with carried forward coverage won't be shown. Click here to find out 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.
a 标签是行内元素啊
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.
a标签在H5下是行内元素。
但在转小程序时,会根据参数的差异,转view 或者navigator(直接用a标签的时候)。
如果是innerHTML里用a标签的话,就直接转的text之前。如果a里套了image,就展示不出来了。
这里就是把innerHTML里a标签的转换逻辑,跟直接用a标签基本对齐
fc6d97a
to
b1b4127
Compare
fix: 修复innerHTML生成小程序时的相关逻辑。
|
这个 PR 做了什么? (简要描述所做更改)
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台: