-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
useTable下 formConfig设置submitOnChange: true ,schemas 属性下有设置defaulfValue时会重复请求 #3224
Comments
这个参数在table里一点效果没有 const [registerTable, { getSelectRows, reload }] = useTable({
title: '操作',
rowKey: 'id',
columns: ReceiptColumn,
api: getReceipt,
searchInfo: {
"type": type.value,
"subType": subType.value,
},
rowSelection: {
type: 'radio',
},
formConfig: {
labelWidth: 110,
schemas: searchSchema,
},
showIndexColumn: false,
bordered: true,
showTableSetting: true,
canResize: true,
tableSetting: { fullScreen: true },
useSearchForm: true,
clickToRowSelect: true,
immediate: false,
}); 他放在table里的目的又是什么 如果只是为了解决ApiSelect |
|
就上面的demo当他为false的时候他是可以阻止打开table去直接请求,但是什么时候触发true 请求 |
reload(),或者控制fetch |
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
setModalProps({confirmLoading: false, destroyOnClose: true, width: 1200});
type.value = data.type
subType.value = data.subType
getTitle.value = data.title
reload({
"type": type.value,
"subType": subType.value,
});
});
export function getReceipt(params: queryReceipt, type: string, subType: string) {
console.info(params)
console.info(type)
console.info(subType)
return defHttp.get<BaseDataResp<ReceiptResp>>(
{
url: API.GetOtherReceipt,
params: params
}
);
} 这样的话它好像并没有把值传到Api当中 打印出的结果都是undefined,显然我在传递之前确保他肯定是有值 |
描述 Bug
使用 useTable,设置
schemas 下有设置 defaulfValue, submitOnChange: true 时,会执行两次请求 getTable
复现 Bug
请描述在演示页面中复现 Bug 的详细步骤,以确保我们可以理解并定位问题。部分 Bug 如果未在 Demo 中涉及,请务必提供关键代码
系统信息
The text was updated successfully, but these errors were encountered: