FormItem: fix the line-wrapping problem of form input under IE 11 #21429
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.
dev
branch.Fix: #21427
此问题是由于对label容器的宽度计算不正确导致的,IE 11下计算其子元素宽度时,padding-right没有被包括在内,导致右侧input框的margin-left太小而换行,现在改成直接计算整个label容器的宽度即可修复此问题。
examples/play/index.vue
代码:修复前:
![image](https://user-images.githubusercontent.com/20365169/139813490-4e78c977-afbe-4b45-bf79-82f6291467d0.png)
![image](https://user-images.githubusercontent.com/20365169/139813531-bc199a08-2d22-4786-b73f-d28bbbe3fee4.png)
修复后:
![image](https://user-images.githubusercontent.com/20365169/139813873-aeae526b-6295-4939-a949-d10113e4ce9a.png)
![image](https://user-images.githubusercontent.com/20365169/139813751-a296a149-e5dc-4a4a-8b0a-8efe6881f8bc.png)