diff --git a/biji-qianduan/src/components/HomePage.vue b/biji-qianduan/src/components/HomePage.vue index 6a4fbbb..569bc18 100644 --- a/biji-qianduan/src/components/HomePage.vue +++ b/biji-qianduan/src/components/HomePage.vue @@ -448,7 +448,10 @@ const renderMenu = (item) => { }); if (item.children && item.children.length > 0) { - return h(ElSubMenu, { index: `group-${item.id}` }, { + return h(ElSubMenu, { + index: `group-${item.id}`, + popperClass: isCollapsed.value ? 'hide-popper' : '' + }, { title: () => h('div', { onClick: () => selectFile(item), style: 'width: 100%;' }, [ wrappedContent() ]), default: () => item.children.map(child => renderMenu(child)) }); @@ -837,6 +840,10 @@ watch(activeMenu, (newVal) => { background-color: var(--primary-color-light) !important; } +.hide-popper { + display: none !important; +} + /* 移除预览中代码块的内部滚动条 */ .markdown-preview .vditor-reset pre { max-height: none !important;