Skip to content

Commit

Permalink
Merge pull request #413 from huanlirui/fix-form-inline-select-width-none
Browse files Browse the repository at this point in the history
fix:修复 element-plus 2.5版本以上,Form表单组件的inline模式下,select选择器的宽度丢失问题
  • Loading branch information
kailong321200875 authored Jan 30, 2024
2 parents c8ccaa8 + a21ebe8 commit ebc20bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"driver.js": "^1.3.1",
"echarts": "^5.4.3",
"echarts-wordcloud": "^2.1.0",
"element-plus": "^2.4.4",
"element-plus": "^2.5.3",
"lodash-es": "^4.17.21",
"mitt": "^3.0.1",
"nprogress": "^0.2.0",
Expand Down
12 changes: 10 additions & 2 deletions src/components/Form/src/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,15 @@ export default defineComponent({
margin-left: 0 !important;
}
.@{elNamespace}-form--inline .@{elNamespace}-input {
width: 245px;
.@{elNamespace}-form--inline {
:deep(.el-form-item__content) {
& > :first-child {
min-width: 229.5px;
}
}
.@{elNamespace}-input-number {
// 229.5px是兼容el-input-number的最小宽度,
min-width: 229.5px;
}
}
</style>

0 comments on commit ebc20bd

Please sign in to comment.