Commit fe576568 by zhaochengxiang

bug fix

parent 057acd94
......@@ -130,6 +130,13 @@ const FC = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
//当删除后刷新当前页面没数据时跳至第一页
React.useEffect(() => {
if (data && data.length === 0 && page.pageNum > 1) {
setArgsAndPage(undefined)
}
}, [page, data])
const storageChange = (e) => {
if (e.key === 'editAssetsChange') {
getAssets()
......
......@@ -162,6 +162,13 @@ const FC = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
// 当删除后刷新当前页面没数据时跳至第一页
React.useEffect(() => {
if (data && data.length === 0 && page.pageNum > 1) {
setArgsAndPage(undefined)
}
}, [page, data])
const storageChange = (e) => {
if (e.key === 'editAssetsChange') {
getAssets()
......
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