Commit eff880b4 by zhaochengxiang

bug fix

parent 5ce06287
...@@ -169,10 +169,10 @@ const ModelList = ({ visible, item, type, onCancel }) => { ...@@ -169,10 +169,10 @@ const ModelList = ({ visible, item, type, onCancel }) => {
}, [visible]) }, [visible])
React.useEffect(() => { React.useEffect(() => {
if (type && item) { if (type && item && visible) {
getList() getList()
} }
}, [args, type]) }, [args, type, visible])
const setArgsByParams = React.useCallback((params) => { const setArgsByParams = React.useCallback((params) => {
setArgs((prev) => { setArgs((prev) => {
...@@ -261,6 +261,7 @@ const ModelList = ({ visible, item, type, onCancel }) => { ...@@ -261,6 +261,7 @@ const ModelList = ({ visible, item, type, onCancel }) => {
const close = () => { const close = () => {
setAnimating(true) setAnimating(true)
onCancel?.() onCancel?.()
setArgsByParams({ page: defaultPage.pageNum })
} }
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment