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:
@@ -1057,6 +1057,63 @@ async function createNewSession(value: string): Promise<void> {
|
||||
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: 200px;
|
||||
max-width: 240px;
|
||||
}
|
||||
|
||||
.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">
|
||||
.knowledge-layout {
|
||||
@@ -1475,23 +1532,41 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.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 {
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<!-- 卡片底部 -->
|
||||
<div class="card-bottom">
|
||||
<div class="type-badge" :class="{ 'document': (kb.type || 'document') === 'document', 'faq': kb.type === 'faq' }">
|
||||
<t-icon :name="kb.type === 'faq' ? 'chat-bubble-help' : 'file'" size="14px" />
|
||||
<t-icon :name="kb.type === 'faq' ? 'chat-bubble-help' : 'folder'" size="14px" />
|
||||
<span>{{ kb.type === 'faq' ? $t('knowledgeEditor.basic.typeFAQ') : $t('knowledgeEditor.basic.typeDocument') }}</span>
|
||||
</div>
|
||||
<span class="card-time">{{ kb.updated_at }}</span>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user