Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(container): modify mobile problem #2646

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/sites/demos/mobile/app/container/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<div class="option-row">
<span class="tip">选择版型:</span>
<tiny-radio-group v-model="pattern">
<tiny-radio label="default">默认:default</tiny-radio>
<tiny-radio label="classic">经典:classic</tiny-radio>
<tiny-radio label="default" v-model="pattern">默认:default</tiny-radio>
<tiny-radio label="classic" v-model="pattern">经典:classic</tiny-radio>
Comment on lines +6 to +7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove redundant v-model from individual radio buttons

The current implementation has v-model binding at both the radio-group and individual radio level, which is redundant and can lead to unexpected behavior. The radio-group already handles the value binding.

Apply this change to fix the issue:

-        <tiny-radio label="default" v-model="pattern">默认:default</tiny-radio>
-        <tiny-radio label="classic" v-model="pattern">经典:classic</tiny-radio>
+        <tiny-radio label="default">默认:default</tiny-radio>
+        <tiny-radio label="classic">经典:classic</tiny-radio>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<tiny-radio label="default" v-model="pattern">默认:default</tiny-radio>
<tiny-radio label="classic" v-model="pattern">经典:classic</tiny-radio>
<tiny-radio label="default">默认:default</tiny-radio>
<tiny-radio label="classic">经典:classic</tiny-radio>

</tiny-radio-group>
</div>
<tiny-container :pattern="pattern">
Expand Down
Loading