-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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: the vxeUI global configuration does not take effect #4574
Conversation
|
WalkthroughThe pull request modifies the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
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.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
packages/effects/plugins/src/vxe-table/use-vxe-grid.vue (2)
211-213
: Consider refactoring theglobalGridConfig
retrieval to avoid duplicationThe
globalGridConfig
is retrieved in both theoptions
computed property and theinit
function. To enhance maintainability and reduce code duplication, consider moving this logic into a shared computed property or a helper function.Suggestion:
Define a computed property for
globalGridConfig
:const globalGridConfig = computed(() => VxeUI?.getConfig()?.grid ?? {});Then, update references:
In the
options
computed property, replaceconst globalGridConfig = VxeUI?.getConfig()?.grid ?? {};
withconst globalConfig = globalGridConfig.value;
.In the
init
function, useconst globalConfig = globalGridConfig.value;
.
211-213
: Improve deprecation warning forformConfig
The current warning message informs users that
formConfig
is not supported and suggests usingformOptions
instead. To provide clearer guidance, consider using a standardized deprecation utility or formatting the message to include migration steps.Suggestion:
Use a helper function for warnings:
function warnDeprecated(optionName: string, alternative: string) { console.warn( `[Vben Vxe Table]: The "${optionName}" is deprecated. Please use "${alternative}" instead.` ); } if (formConfig) { warnDeprecated('formConfig', 'formOptions'); }
Description
fixed #4572
Type of change
Please delete options that are not relevant.
pnpm-lock.yaml
unless you introduce a new test example.Checklist
pnpm run docs:dev
command.pnpm test
.feat:
,fix:
,perf:
,docs:
, orchore:
.Summary by CodeRabbit
New Features
Bug Fixes
formOptions
prop instead.Documentation