Skip to content

Commit ebc20bd

Browse files
Merge pull request kailong321200875#413 from huanlirui/fix-form-inline-select-width-none
fix:修复 element-plus 2.5版本以上,Form表单组件的inline模式下,select选择器的宽度丢失问题
2 parents c8ccaa8 + a21ebe8 commit ebc20bd

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"driver.js": "^1.3.1",
4141
"echarts": "^5.4.3",
4242
"echarts-wordcloud": "^2.1.0",
43-
"element-plus": "^2.4.4",
43+
"element-plus": "^2.5.3",
4444
"lodash-es": "^4.17.21",
4545
"mitt": "^3.0.1",
4646
"nprogress": "^0.2.0",

src/components/Form/src/Form.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,15 @@ export default defineComponent({
424424
margin-left: 0 !important;
425425
}
426426
427-
.@{elNamespace}-form--inline .@{elNamespace}-input {
428-
width: 245px;
427+
.@{elNamespace}-form--inline {
428+
:deep(.el-form-item__content) {
429+
& > :first-child {
430+
min-width: 229.5px;
431+
}
432+
}
433+
.@{elNamespace}-input-number {
434+
// 229.5px是兼容el-input-number的最小宽度,
435+
min-width: 229.5px;
436+
}
429437
}
430438
</style>

0 commit comments

Comments
 (0)