Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/juicecube/mlz-admin/7UQ1vNHAjeQhxWVnBM7PBP3oKhzc |
Codecov Report
@@ Coverage Diff @@
## feature #138 +/- ##
========================================
Coverage 89.38% 89.38%
========================================
Files 18 18
Lines 358 358
Branches 137 137
========================================
Hits 320 320
Misses 36 36
Partials 2 2
Continue to review full report at Codecov.
|
|
|
||
| const formSubmitters = searchings.length ? ( | ||
| <Col span={sparedColSpan < perColspan + collapsingButtonColspan ? 24 : sparedColSpan} style={{ textAlign: 'right', marginBottom: hasMoreInteractionArea ? 16 : 0 }} flex="1"> | ||
| <Col span={sparedColSpan < perColspan + collapsingButtonColspan ? 24 : sparedColSpan} style={{ textAlign: 'right', marginBottom: hasMoreInteractionArea ? 16 : 0, flex: '1 1 auto' }}> |
There was a problem hiding this comment.
这里是不能使用flex属性吗?
这样允许的话,尽量使用antd暴露出来的属性。
There was a problem hiding this comment.
<Col span={sparedColSpan < perColspan + collapsingButtonColspan ? 24 : sparedColSpan} style={{ textAlign: 'right', marginBottom: hasMoreInteractionArea ? 16 : 0 }} flex="1 1 auto">There was a problem hiding this comment.
我在chrome浏览器里面,看到flex: 1 === flex: 1 1 0%,而不是flex: 1 1 auto,
所以当宽度不够时,按钮组所属的栅格宽度会变成0。
参考这篇文章:https://zhuanlan.zhihu.com/p/136223806
There was a problem hiding this comment.
好,我懂你这个意思。我意思是这个flex,使用组件的flex属性传递,而不是style传递,试一下可不可以:
<A style="ABCD" flex="1 1 auto"/>而不是
<A style="ABCD,flex: `1 1 auto`"/>别直接套style,容易出问题,它内部可能会有用。使用antd的属性。 其它地方也一样,如果看到的话都改一下。
There was a problem hiding this comment.
我在chrome浏览器里面,看到flex: 1 === flex: 1 1 0%,而不是flex: 1 1 auto,
所以当宽度不够时,按钮组所属的栅格宽度会变成0。
参考这篇文章:https://zhuanlan.zhihu.com/p/136223806
flex-basis的默认值是auto,但是在flex附和属性里会被修改成0px or 0%。 这个不错,学到了。
https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex-basis#%E5%8F%96%E5%80%BC
https://www.bilibili.com/read/cv9314814/
|
c9dd9bb ← dom结构发生变化,需要更新一下快照:npm run test:update,否则快照测试通不过。 之后,本地运行下npm run test,看下还有哪些测试没通过的,可能需要改单元测试代码。 @710831265 都熟悉了就不麻烦了😂 |


PR 类型:
❗️ 请务必确保:
书写-构建-使用自测流程请尽量保证: