-
Notifications
You must be signed in to change notification settings - Fork 276
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(select): [select] modifying the loading icon issue #2242
Conversation
WalkthroughThe changes in this pull request focus on the Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🔇 Additional comments (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/vue/src/select/src/pc.vue
Outdated
@@ -581,7 +581,7 @@ | |||
|
|||
<component | |||
class="circular" | |||
:is="state.designConfig.icons.loadingIcon || 'icon-loading-shadow'" | |||
:is="state.designConfig?.icons?.loadingIcon || 'icon-loading-shadow'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid Using Optional Chaining (?.
) in Vue 2 Templates
Optional chaining (?.
) is not natively supported in Vue 2 templates and can cause compilation issues during the build process. To ensure compatibility and prevent potential errors, consider refactoring the expression to avoid using optional chaining in the template.
Apply this diff to replace the optional chaining:
- :is="state.designConfig?.icons?.loadingIcon || 'icon-loading-shadow'"
+ :is="(state.designConfig && state.designConfig.icons && state.designConfig.icons.loadingIcon) || 'icon-loading-shadow'"
📝 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.
:is="state.designConfig?.icons?.loadingIcon || 'icon-loading-shadow'" | |
:is="(state.designConfig && state.designConfig.icons && state.designConfig.icons.loadingIcon) || 'icon-loading-shadow'" |
packages/vue/src/select/src/pc.vue
Outdated
@@ -581,7 +581,7 @@ | |||
|
|||
<component | |||
class="circular" | |||
:is="state.designConfig.icons.loadingIcon || 'icon-loading-shadow'" | |||
:is="state.designConfig?.icons?.loadingIcon || 'icon-loading-shadow'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种?.的操作符貌似在vue2的版本中无法识别,建议改成机器人提供的写法:state.designConfig && state.designConfig.icons && state.designConfig.icons.loadingIcon
049990c
to
d38b51a
Compare
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
searchable
,showEmptyImage
,inputBoxType
,tagType
,clearNoMatchValue
,showLimitText
,showProportion
,clickExpand
,maxVisibleRows
,showAllTextTag
, andallText
.