-
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: 修复因扩展vxe-table的query函数导致的表单参数不能获取到最新值 #4824
Conversation
|
WalkthroughThe changes in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)packages/effects/plugins/src/vxe-table/use-vxe-grid.vue (1)
The removal of Let's verify that no other components rely on the removed ✅ Verification successfulRemoval of Based on the codebase analysis:
The removal is safe as it:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any other usages of extendProxyOptions in the codebase
rg "extendProxyOptions"
# Search for components that might be extending vxe-table's query function
rg -g '*.{vue,ts,js}' "vxe.*table.*query|vxe.*grid.*query"
Length of output: 309 Script: #!/bin/bash
# Let's examine the extends.ts file to understand the extendProxyOptions implementation
cat packages/effects/plugins/src/vxe-table/extends.ts
# Also check for any imports of extends.ts
rg -l "extends.*vxe-table"
Length of output: 1576 Script: #!/bin/bash
# Let's check for any imports of the extendProxyOptions function
rg -l "import.*\{.*extendProxyOptions.*\}.*from.*vxe-table"
# Also check for direct usage of proxyConfig to see if any other components implement similar functionality
rg "proxyConfig.*ajax"
# Check for any other files that might be using the grid API's setState method
rg "gridOptions.*proxyConfig"
Length of output: 326 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 (
|
看着会导致 #4607 回归 |
问题的根源在于packages/effects/plugins/src/vxe-table/extends.ts, line: 41: api.setState({
gridOptions: {
proxyConfig: {
ajax: {
[key]: wrapperFn,
},
},
},
}); 或者说另外一种方案,修改这个方法: const wrapperFn = async (params: any, _formValues: any, ...args: any[]) => {
const formValues = getFormValues();
const data = await configFn(params, formValues, ...args);
return data;
}; 改为以下这样,这种我没试过: const wrapperFn = async (params: any, _formValues: any, ...args: any[]) => {
// const formValues = getFormValues();
const data = await configFn(params, _formValues, ...args);
return data;
}; |
Description
表单参数未能正确更新相关的issue:#4785,#4752
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