Commit ff2347ad by zhaochengxiang

bug fix

parent dd4c9f5c
...@@ -139,8 +139,7 @@ const AssetManageTree = (props) => { ...@@ -139,8 +139,7 @@ const AssetManageTree = (props) => {
if ((data??[]).length > 0) { if ((data??[]).length > 0) {
setTemplateType(data[0].type) setTemplateType(data[0].type)
LocalStorage.set(`templateType-${appId}`, data[0].type) LocalStorage.set(`templateType-${appId}`, data[0].type)
onSelect?.('', '') getAllDirectoryAsTree(true)
getAllDirectoryAsTree(false)
} }
}, },
error: () => { error: () => {
...@@ -184,9 +183,9 @@ const AssetManageTree = (props) => { ...@@ -184,9 +183,9 @@ const AssetManageTree = (props) => {
const getAllDirectoryAsTree = (resetCurrentDirId=true, defaultSelectedId='', refresh = false) => { const getAllDirectoryAsTree = (resetCurrentDirId=true, defaultSelectedId='', refresh = false) => {
setLoading(true); setLoading(true);
// if (resetCurrentDirId) { if (resetCurrentDirId) {
// onSelect && onSelect('', ''); onSelect && onSelect('', '');
// } }
function disposeData(data) { function disposeData(data) {
setLoading(false); setLoading(false);
...@@ -578,8 +577,6 @@ const AssetManageTree = (props) => { ...@@ -578,8 +577,6 @@ const AssetManageTree = (props) => {
const onTreeSelect = (keys, { node }) => { const onTreeSelect = (keys, { node }) => {
if ((keys||[]).length === 0) { if ((keys||[]).length === 0) {
setCurrentDirId();
onSelect?.('', '');
return; return;
} }
......
...@@ -235,7 +235,7 @@ const AssetTable = (props) => { ...@@ -235,7 +235,7 @@ const AssetTable = (props) => {
}, []) }, [])
useEffect(() => { useEffect(() => {
if (nodeId !== null && nodeId !== undefined) { if (nodeId) {
setSelectItem({}); setSelectItem({});
setCheckedKeys([]); setCheckedKeys([]);
......
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