Commit 3c8dd2e1 by zhaochengxiang

资产编辑内容丢失的问题

parent 27024f93
...@@ -31,9 +31,7 @@ const AssetAction = (props) => { ...@@ -31,9 +31,7 @@ const AssetAction = (props) => {
getElements(); getElements();
} else if ((id||'')!=='') { } else if ((id||'')!=='') {
setCurrentAction('detail'); setCurrentAction('detail');
getElements(() => {
getAsset(); getAsset();
});
} }
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [id]) }, [id])
...@@ -84,6 +82,9 @@ const AssetAction = (props) => { ...@@ -84,6 +82,9 @@ const AssetAction = (props) => {
}, },
callback: data => { callback: data => {
setLoading(false); setLoading(false);
setElements(data?.elements||[]);
onElementsChange && onElementsChange(data?.elements||[]);
setMetadataId(data?.mid||''); setMetadataId(data?.mid||'');
onMetadataChange && onMetadataChange(data?.mid||''); onMetadataChange && onMetadataChange(data?.mid||'');
......
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