Closed kiner-tang closed 1 year ago
🎊 PR Preview has been successfully built and deployed to https://pro-components-preview-pr-6180.surge.sh
Base: 99.40% // Head: 98.90% // Decreases project coverage by -0.50%
:warning:
Coverage data is based on head (
fb25cb4
) compared to base (4b522af
). Patch coverage: 100.00% of modified lines in pull request are covered.:exclamation: Current head fb25cb4 differs from pull request most recent head 9ba2f57. Consider uploading reports for the commit 9ba2f57 to get more accurate results
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
代码比较多,能简单描述下你的思路吗
代码比较多,能简单描述下你的思路吗
这边的思路就是将所有是用户选择的表单组件列举出来,使用tableForm.selectPlaceholder
,而其他的使用tableForm.inputPlaceholder
,而针对范围选择的组件,我们使用数组,其他则直接使用相应的placeholder
你怎么知道用户的是什么,我觉得不如简单点,不要给用户传 placeholder
你怎么知道用户的是什么,我觉得不如简单点,不要给用户传 placeholder
这个只是默认的placeholder
呀,用户可以自己传placeholder覆盖的呀,只有用户没传placeholder的时候才会使用这个逻辑
按照目前线上的逻辑,如果用户不传placeholder
的话,有些类型是会显示异常的,比如树形选择框没显示placeholder
以及范围选择框异常
我们自己的自己处理吧,用了renderForm 就不要给 placeholder props 了。
树形选择框没显示placeholder,这个是个bug,应该修复一下
这个issue的问题就是应该给 placeholder 数组的时候给了一个 placeholder。导致显示异常。还不如不显示
这个issue的问题就是应该给 placeholder 数组的时候给了一个 placeholder。导致显示异常。还不如不显示
不是吧,我理解是这边显示的是一个范围选择器,应该传一个placeholder数组过去,但issue给的示例没有传自定义的placeholder
,那么就应该采用默认的placeholder
,但我们以前的逻辑,默认的placeholder
不是数组,并且固定成了tableForm.inputPlaceholder
,所以导致显示异常了。
我们没法知道用户 renderFormItem 到底给的是什么的,可能是个input 可能是的daterange
我们没法知道用户 renderFormItem 到底给的是什么的,可能是个input 可能是的daterange
我们不是应该根据用户显示指定的valueType
判断类型吗?而且我们这里设置的也是默认placeholder
,如果用户一定要在renderFormItem
里传一个与valueType
相悖的组件,那么用户自己自定义placeholder
是不是也可以?
我们自己的自己处理吧,用了renderForm 就不要给 placeholder props 了。
树形选择框没显示placeholder,这个是个bug,应该修复一下
我也觉得应该如果传了 renderFormItem 的话应该交给用户自行维护 placeholder,如果用户没指定,则用组件的默认行为而不是统一注入。这里有个类似的 issue。
我们没法知道用户 renderFormItem 到底给的是什么的,可能是个input 可能是的daterange
那当用户传入renderFormItem
时,我们不指定默认的placeholder
,如果没传入的话,我们就按照这个PR
的方式处理一下默认的placeholder
如何? @chenshuai2144
This pull request introduces 2 alerts when merging d8d2512a213f2c31c922a3101d99665502966c1c into 4b522af533473de0e7ad6eb4a0296acc007f10eb - view on LGTM.com
new alerts:
Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. It looks like GitHub code scanning with CodeQL is already set up for this repo, so no further action is needed :rocket:. For more information, please check out our post on the GitHub blog.
看起来已经好了,能合并了吗
看起来已经好了,能合并了吗
恩恩,已经按照要求,传入renderFormItem
时不指定placeholder
,并且为各个原子组件,没有默认placeholder
的,都添加上了默认的placeholder
了
看起来已经好了,能合并了吗
恩恩,已经按照要求,传入
renderFormItem
时不指定placeholder
,并且为各个原子组件,没有默认placeholder
的,都添加上了默认的placeholder
了
先稍等一下,我再最后检查一下有没有错漏的地方
@chenshuai2144 应该没问题了