Commit 43566864 by zhaochengxiang

服务全量显示

parent 7868772c
...@@ -199,14 +199,14 @@ const ModelTree = (props) => { ...@@ -199,14 +199,14 @@ const ModelTree = (props) => {
} else if (refrence === '') { } else if (refrence === '') {
const currentItem = (data.subCatalogs||[]).length>0?data.subCatalogs[0]: null; // const currentItem = (data.subCatalogs||[]).length>0?data.subCatalogs[0]: null;
setItem(currentItem); // setItem(currentItem);
if (currentItem && currentItem.key) { // if (currentItem && currentItem.key) {
setExpandedKeys([currentItem?.key]); // setExpandedKeys([currentItem?.key]);
} // }
onSelect && onSelect(currentItem?(currentItem.key||''):''); onSelect && onSelect(data?.id);
} }
}, },
...@@ -310,6 +310,11 @@ const ModelTree = (props) => { ...@@ -310,6 +310,11 @@ const ModelTree = (props) => {
const onTreeSelect = (keys,data) => { const onTreeSelect = (keys,data) => {
if ((keys||[]).length === 0) { if ((keys||[]).length === 0) {
if (viewSelectedKey === 'add') {
setItem();
onSelect && onSelect(rootId);
}
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