困惑,这样写为什么protable的request会执行 #10249
HoraceZ919
started this conversation in
General
Replies: 1 comment
-
|
ProTable 加载的时候默认request调用的 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
大概逻辑是这样,ProTable如果是再封装一层,return过去的,上面没有关联的button也会触发request
`const TableTop = () => (
<Button
onClick={() => {
showModal(true)
}}
>
)
const TableContent = () => <ProTable {...props} request={() => {}} />
return (
<>
<Row gutter={[8, 12]}>
//ProTable封装在里面的话,TableTop的按钮也会触发ProTable的request
<ProTable {...props} /> //写外面就可以
<Modal {...props} />
</>
)
`
Beta Was this translation helpful? Give feedback.
All reactions