fix(components): [sender] fix autosize resizable lose bug#440
fix(components): [sender] fix autosize resizable lose bug#440webvs2 wants to merge 1 commit intoelement-plus-x:mainfrom
autosize resizable lose bug#440Conversation
📝 WalkthroughWalkthroughModified the Sender component to standardize conditional return statements and wrapped the el-input element in an additional div container. These structural and formatting adjustments address height calculation issues when the component is nested within layout structures like el-splitter. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@packages/core/src/components/Sender/index.vue`:
- Around line 120-121: There are brace-style lint violations where "} else {" is
used; update all occurrences in the Sender component so the else begins on a new
line (replace "} else {" with "}\nelse {") — notably for the block that sets
popoverVisible.value = true and the other similar conditional blocks in
packages/core/src/components/Sender/index.vue (apply the same change for the
instances reported around the toggle/popover and related handlers).
- Around line 59-60: The single-line early-return statements in Sender component
violate the antfu/if-newline lint rule; change each single-line if-return into a
multi-line block (e.g., replace "if (props.readOnly || props.disabled) return;"
with a multi-line if { return; }) where they appear (notably around the call to
emits('update:modelValue', val) and the other occurrences flagged at lines
referenced in the review); apply the same fix to all similar single-line if
statements in this file so each if has its body on a new line, adjusting the
blocks that guard emits, event handlers, or any early returns in the Sender
component.
- Around line 429-453: The new plain <div> wrapper in the Sender component
breaks the flex layout of .el-sender-content; update the wrapper to <div
class="el-sender-input-wrap"> wrapping the <el-input> (in the Sender component)
and add CSS for .el-sender-input-wrap with "flex: 1;" and "min-width: 0;" in the
Sender component's styles (style.scss) so the input can grow and autosize
correctly.
close #436
Summary by CodeRabbit
Refactor
Style
✏️ Tip: You can customize this high-level summary in your review settings.