Skip to content

Conversation

@Rexexe
Copy link

@Rexexe Rexexe commented Nov 16, 2025

Description

演示系统-系统管理-菜单管理-新增/修改中的标题样式异常问题,表现为直角输入框而非圆角,主要原因是因为给予了addonAfter属性空白内容,修改为动态添加可以修复改问题

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs:dev command.
  • Run the tests with pnpm test.
  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Bug Fixes
    • Fixed form input field to display the addon suffix only when a value is present, preventing unnecessary UI elements from appearing.

@changeset-bot
Copy link

changeset-bot bot commented Nov 16, 2025

⚠️ No Changeset found

Latest commit: 669484e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 16, 2025

Walkthrough

The addonAfter property on an Input component is now conditionally added using a spread operator only when titleSuffix.value is truthy, preventing undefined or falsy values from being passed as props. A blank line was also removed for formatting consistency.

Changes

Cohort / File(s) Summary
Conditional prop spreading in form schema
playground/src/views/system/menu/modules/form.vue
Modified Input component props to conditionally include addonAfter only when titleSuffix.value is truthy via spread operator; removed stray blank line

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • The change is localized to a single file with minimal scope
  • Conditional logic is straightforward and defensive (preventing undefined props)
  • No complex interdependencies or behavioral side effects

Suggested labels

bug

Suggested reviewers

  • anncwb
  • vince292007
  • mynetfan

Poem

🐰 A suffix now spreads only when true,
No phantom props for form to pursue,
Truthiness guards what Input shall see,
Cleaner and smarter, as code ought to be!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title in Chinese accurately describes the bug fix: it resolves a styling issue with the title input in menu management.
Description check ✅ Passed The PR description includes the required template sections with a clear explanation of the bug, identifies it as a bug fix, and all checklist items are marked complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f09aace and 669484e.

📒 Files selected for processing (1)
  • playground/src/views/system/menu/modules/form.vue (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: post-update (windows-latest)
  • GitHub Check: post-update (ubuntu-latest)
🔇 Additional comments (1)
playground/src/views/system/menu/modules/form.vue (1)

110-110: LGTM! Fix correctly prevents falsy values from being passed to addonAfter.

The conditional spread ensures the addonAfter property is only added when titleSuffix.value is truthy, preventing empty strings or undefined values from causing the square-cornered input styling issue. This directly addresses the root cause described in the PR objectives.

Tip

📝 Customizable high-level summaries are now available!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide custom instructions to shape the summary (bullet lists, tables, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example:

"Create a concise high-level summary as a bullet-point list. Then include a Markdown table showing lines added and removed by each contributing author."


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@doraemonxxx
Copy link

could you post a screenshot that shows the bug or issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants