fix(renderer): remove the replacement 'div' for ConfigProvider when i… #3022
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
当renderer中的ConfigProvider未设置时默认以div进行兜底,但这样做的坏处就是div会影响布局,当我们以flex布局整个应用时,div不会继承高度,会导致内部的flex布局组件因为缺少高度失效。
建议当ConfigProvider为空时不创建元素,ConfigProvider可以由上层封装自主实现,因为不同的组件库ConfigProvider的属性是不一样的,目前也仅传入了device和locale,所以面向pc和移动端不同的组件库当前方案实际上也无法满足需求,不设置renderer的ConfigProvider这种场景是存在的。