🎨 搜索条件删空以后应该隐藏

This commit is contained in:
Vanessa 2022-12-04 23:30:42 +08:00
parent d235b18462
commit a71b43fb87

View File

@ -709,7 +709,11 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:
fetchPost("/api/storage/removeCriterion", {name: item.name.trim()});
event.preventDefault();
event.stopPropagation();
menuElement.remove();
if (!menuElement.previousElementSibling && !menuElement.nextElementSibling) {
menuElement.parentElement.parentElement.remove();
} else {
menuElement.remove();
}
return;
}
if (config.layout !== item.layout) {