feat: Optimize dropdown positioning and UI components for knowledge base management

- Enhanced dropdown positioning logic to dynamically adjust based on available space, ensuring better visibility and usability.
- Improved UI styles for dropdown menus and action items, including consistent padding, margins, and hover effects.
- Updated localization strings for better clarity in knowledge base actions and menu items.
- Refactored related components to streamline the user experience when interacting with knowledge base features.
This commit is contained in:
wizardchen
2025-11-20 13:37:21 +08:00
parent 3b1a859374
commit aabc9faf74
6 changed files with 713 additions and 370 deletions
@@ -2283,6 +2283,63 @@ watch(() => entries.value.map(e => ({
min-width: 120px;
}
}
/* 面包屑下拉菜单优化 */
.t-popup__content {
.t-dropdown__menu {
background: #ffffff;
border: 1px solid #e7e9eb;
border-radius: 10px;
box-shadow: 0 6px 28px rgba(15, 23, 42, 0.08);
padding: 6px;
min-width: 150px;
max-width: 200px;
}
.t-dropdown__item {
padding: 8px 12px;
border-radius: 6px;
margin: 2px 0;
transition: all 0.12s ease;
font-size: 13px;
color: #0f172a;
cursor: pointer;
min-width: auto !important;
max-width: 100% !important;
display: flex !important;
align-items: center;
width: 100%;
&:hover {
background: #f6f8f7;
color: #10b981;
}
.t-dropdown__item-icon {
flex-shrink: 0;
margin-right: 8px;
color: inherit;
display: flex;
align-items: center;
.t-icon {
font-size: 16px;
}
}
.t-dropdown__item-text {
color: inherit !important;
font-size: 13px !important;
line-height: 1.5 !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
flex: 1;
min-width: 0;
display: block;
}
}
}
</style>
<style scoped lang="less">
.faq-manager {
@@ -2713,23 +2770,41 @@ watch(() => entries.value.map(e => ({
.breadcrumb-link {
border: none;
background: transparent;
padding: 0;
padding: 4px 8px;
margin: -4px -8px;
font: inherit;
color: #4e5969;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 4px;
transition: color 0.2s ease;
border-radius: 6px;
transition: all 0.12s ease;
&:hover:not(:disabled) {
color: #07c05f;
color: #10b981;
background: #f6f8f7;
}
&:disabled {
cursor: not-allowed;
color: #c9ced6;
}
&.dropdown {
padding-right: 6px;
:deep(.t-icon) {
font-size: 14px;
transition: transform 0.12s ease;
}
&:hover:not(:disabled) {
:deep(.t-icon) {
transform: translateY(1px);
}
}
}
}
.breadcrumb-separator {