Skip to content

fix: modifying the steps component document #3076 #3312

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 18, 2025
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
2 changes: 1 addition & 1 deletion examples/sites/demos/apis/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
},
{
name: 'content-center',
type: 'string',
type: 'boolean',
defaultValue: 'false',
desc: {
Comment on lines 33 to 36
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Type and default value mismatch needs to be addressed

While the type for content-center is correctly changed from string to boolean, the default value on line 35 is still defined as a string 'false' rather than a boolean value. This creates an inconsistency in the API documentation that could confuse developers.

  {
    name: 'content-center',
    type: 'boolean',
-   defaultValue: 'false',
+   defaultValue: false,
    desc: {
      'zh-CN': '使步骤条内容默认居中显示',
      'en-US': 'Make the step bar content appear centered by default'
    },
📝 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
name: 'content-center',
type: 'string',
type: 'boolean',
defaultValue: 'false',
desc: {
{
name: 'content-center',
type: 'boolean',
defaultValue: false,
desc: {
'zh-CN': '使步骤条内容默认居中显示',
'en-US': 'Make the step bar content appear centered by default'
},

'zh-CN': '使步骤条内容默认居中显示',
Expand Down
Loading