feat(agent): enhance agent and skill management features
- Updated the API to include disabled agent IDs for better management of user-specific agent visibility. - Introduced a new function to set the disabled state for shared agents, allowing users to manage their shared agent preferences. - Added a new Skills API to retrieve available skills, enhancing the overall agent capabilities. - Improved the AgentSelector and related components to filter out disabled agents, ensuring a cleaner user experience. - Updated localization strings to reflect new features and improve clarity in agent and skill management. This update enhances the user experience by providing better control over agent visibility and introducing new skill management functionalities.
This commit is contained in:
@@ -1137,6 +1137,27 @@ async function createNewSession(value: string): Promise<void> {
|
||||
<t-icon name="chevron-right" class="breadcrumb-separator" />
|
||||
<span class="breadcrumb-current">{{ $t('knowledgeEditor.document.title') }}</span>
|
||||
</h2>
|
||||
<!-- 身份与最后更新:紧凑单行,置于标题行右侧,悬停显示权限说明 -->
|
||||
<div v-if="kbInfo" class="kb-access-meta">
|
||||
<t-tooltip :content="accessPermissionSummary" placement="top">
|
||||
<span class="kb-access-meta-inner">
|
||||
<t-tag size="small" :theme="isOwner ? 'success' : (currentSharedKb?.permission === 'admin' ? 'primary' : currentSharedKb?.permission === 'editor' ? 'warning' : 'default')" class="kb-access-role-tag">
|
||||
{{ accessRoleLabel }}
|
||||
</t-tag>
|
||||
<template v-if="currentSharedKb">
|
||||
<span class="kb-access-meta-sep">·</span>
|
||||
<span class="kb-access-meta-text">
|
||||
{{ $t('knowledgeBase.accessInfo.fromOrg') }}「{{ currentSharedKb.org_name }}」
|
||||
{{ $t('knowledgeBase.accessInfo.sharedAt') }} {{ formatStringDate(new Date(currentSharedKb.shared_at)) }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="kbLastUpdated">
|
||||
<span class="kb-access-meta-sep">·</span>
|
||||
<span class="kb-access-meta-text">{{ $t('knowledgeBase.accessInfo.lastUpdated') }} {{ kbLastUpdated }}</span>
|
||||
</template>
|
||||
</span>
|
||||
</t-tooltip>
|
||||
</div>
|
||||
<t-tooltip v-if="canManage" :content="$t('knowledgeBase.settings')" placement="top">
|
||||
<button
|
||||
type="button"
|
||||
@@ -1149,49 +1170,6 @@ async function createNewSession(value: string): Promise<void> {
|
||||
</t-tooltip>
|
||||
</div>
|
||||
<p class="document-subtitle">{{ $t('knowledgeEditor.document.subtitle') }}</p>
|
||||
<!-- 当前知识库权限与来源信息 -->
|
||||
<div v-if="kbInfo" class="kb-access-info">
|
||||
<span class="kb-access-role">
|
||||
<t-icon name="user" class="kb-access-item-icon" />
|
||||
<span class="kb-access-label">{{ $t('knowledgeBase.accessInfo.myRole') }}:</span>
|
||||
<t-tag size="small" :theme="isOwner ? 'success' : (currentSharedKb?.permission === 'admin' ? 'primary' : currentSharedKb?.permission === 'editor' ? 'warning' : 'default')">
|
||||
{{ accessRoleLabel }}
|
||||
</t-tag>
|
||||
<t-tooltip :content="accessPermissionSummary" placement="top">
|
||||
<t-icon name="help-circle" class="kb-access-item-icon kb-access-permission-tip" />
|
||||
</t-tooltip>
|
||||
</span>
|
||||
<template v-if="currentSharedKb">
|
||||
<span class="kb-access-sep">·</span>
|
||||
<span class="kb-access-source">
|
||||
<img src="@/assets/img/organization-green.svg" class="kb-access-org-icon" alt="" aria-hidden="true" />
|
||||
{{ $t('knowledgeBase.accessInfo.fromOrg') }}「{{ currentSharedKb.org_name }}」
|
||||
<t-icon name="time" class="kb-access-item-icon" />
|
||||
{{ $t('knowledgeBase.accessInfo.sharedAt') }} {{ formatStringDate(new Date(currentSharedKb.shared_at)) }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="kbLastUpdated">
|
||||
<span class="kb-access-sep">·</span>
|
||||
<span class="kb-access-updated">
|
||||
<t-icon name="time" class="kb-access-item-icon" />
|
||||
{{ $t('knowledgeBase.accessInfo.lastUpdated') }} {{ kbLastUpdated }}
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="canEdit" class="document-header-actions">
|
||||
<t-dropdown
|
||||
:options="documentActionOptions"
|
||||
trigger="click"
|
||||
placement="bottom-right"
|
||||
@click="handleDocumentActionSelect"
|
||||
>
|
||||
<t-button class="doc-action-btn dropdown-action-btn">
|
||||
<template #icon><t-icon name="file-add" /></template>
|
||||
<span>{{ $t('knowledgeBase.addDocument') }}</span>
|
||||
<t-icon name="chevron-down" size="14px" class="dropdown-arrow" />
|
||||
</t-button>
|
||||
</t-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1375,7 +1353,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
</aside>
|
||||
<div class="tag-content">
|
||||
<div class="doc-card-area">
|
||||
<!-- 搜索栏和筛选 -->
|
||||
<!-- 搜索栏、筛选与添加文档 -->
|
||||
<div class="doc-filter-bar">
|
||||
<t-input
|
||||
v-model.trim="docSearchKeyword"
|
||||
@@ -1396,6 +1374,20 @@ async function createNewSession(value: string): Promise<void> {
|
||||
class="doc-type-select"
|
||||
clearable
|
||||
/>
|
||||
<div v-if="canEdit" class="doc-filter-actions">
|
||||
<t-tooltip :content="$t('knowledgeBase.addDocument')" placement="top">
|
||||
<t-dropdown
|
||||
:options="documentActionOptions"
|
||||
trigger="click"
|
||||
placement="bottom-right"
|
||||
@click="handleDocumentActionSelect"
|
||||
>
|
||||
<t-button variant="text" theme="default" class="content-bar-icon-btn" size="small">
|
||||
<template #icon><t-icon name="file-add" size="16px" /></template>
|
||||
</t-button>
|
||||
</t-dropdown>
|
||||
</t-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="doc-scroll-container"
|
||||
@@ -1672,23 +1664,26 @@ async function createNewSession(value: string): Promise<void> {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
padding: 24px 44px 32px;
|
||||
padding: 24px 30px 32px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 与列表页一致:整体一块白底圆角区,左侧标签栏为内部分区
|
||||
.knowledge-main {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
background: #fff;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tag-sidebar {
|
||||
width: 230px;
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e7ebf0;
|
||||
padding: 16px;
|
||||
width: 176px;
|
||||
background: #fafbfc;
|
||||
border-right: 1px solid #e7ebf0;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
@@ -1699,36 +1694,37 @@ async function createNewSession(value: string): Promise<void> {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 8px;
|
||||
color: #1d2129;
|
||||
|
||||
.sidebar-title {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 4px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
|
||||
.sidebar-count {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
color: #86909c;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
color: #c9ced6;
|
||||
align-items: center;
|
||||
|
||||
.create-tag-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #00a870;
|
||||
line-height: 1;
|
||||
@@ -1747,7 +1743,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
}
|
||||
|
||||
.tag-search-bar {
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
:deep(.t-input) {
|
||||
font-size: 12px;
|
||||
@@ -1759,19 +1755,19 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.tag-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
|
||||
.tag-load-more {
|
||||
padding: 8px 0 0;
|
||||
padding: 6px 0 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
:deep(.t-button) {
|
||||
padding: 0;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
color: #00a870;
|
||||
}
|
||||
}
|
||||
@@ -1780,24 +1776,24 @@ async function createNewSession(value: string): Promise<void> {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 10px;
|
||||
padding: 6px 8px;
|
||||
border-radius: 6px;
|
||||
color: #4e5969;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
font-size: 13px;
|
||||
font-size: 12px;
|
||||
|
||||
.tag-list-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
|
||||
.t-icon {
|
||||
flex-shrink: 0;
|
||||
color: #86909c;
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
}
|
||||
@@ -1813,17 +1809,17 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.tag-list-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-left: 8px;
|
||||
gap: 5px;
|
||||
margin-left: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.tag-count {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
color: #86909c;
|
||||
font-weight: 500;
|
||||
padding: 2px 6px;
|
||||
border-radius: 10px;
|
||||
padding: 2px 5px;
|
||||
border-radius: 8px;
|
||||
background: #f7f9fc;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
@@ -1963,8 +1959,8 @@ async function createNewSession(value: string): Promise<void> {
|
||||
}
|
||||
|
||||
.tag-more-btn {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -1983,9 +1979,9 @@ async function createNewSession(value: string): Promise<void> {
|
||||
|
||||
.tag-empty-state {
|
||||
text-align: center;
|
||||
padding: 12px 8px;
|
||||
padding: 10px 6px;
|
||||
color: #a1a7b3;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2032,9 +2028,12 @@ async function createNewSession(value: string): Promise<void> {
|
||||
|
||||
.tag-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
padding: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.doc-card-area {
|
||||
@@ -2053,6 +2052,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
|
||||
.doc-search-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.doc-type-select {
|
||||
@@ -2060,6 +2060,19 @@ async function createNewSession(value: string): Promise<void> {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.doc-filter-actions {
|
||||
flex-shrink: 0;
|
||||
:deep(.content-bar-icon-btn) {
|
||||
color: #86909c;
|
||||
background: transparent;
|
||||
border: none;
|
||||
&:hover {
|
||||
color: #4e5969;
|
||||
background: #f2f3f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.t-input) {
|
||||
font-size: 13px;
|
||||
background-color: #f7f9fc;
|
||||
@@ -2105,16 +2118,14 @@ async function createNewSession(value: string): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// Header 样式
|
||||
// Header 样式(无底部分割线,留更多空间给下方内容区)
|
||||
.document-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
padding: 0 0 16px;
|
||||
gap: 12px;
|
||||
flex-shrink: 0;
|
||||
border-bottom: 1px solid #e7ebf0;
|
||||
|
||||
.document-header-title {
|
||||
display: flex;
|
||||
@@ -2122,34 +2133,6 @@ async function createNewSession(value: string): Promise<void> {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.document-header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-shrink: 0;
|
||||
|
||||
.doc-action-btn {
|
||||
background: linear-gradient(135deg, #07c05f 0%, #00a67e 100%);
|
||||
border: none;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(135deg, #05a04f 0%, #008a6a 100%);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.dropdown-action-btn) {
|
||||
.t-button__text {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dropdown-arrow {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.document-title-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -2157,6 +2140,33 @@ async function createNewSession(value: string): Promise<void> {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.kb-access-meta {
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.kb-access-meta-inner {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 12px;
|
||||
color: #86909c;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.kb-access-role-tag {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.kb-access-meta-sep {
|
||||
color: #c9ced6;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.kb-access-meta-text {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.document-breadcrumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -2235,61 +2245,6 @@ async function createNewSession(value: string): Promise<void> {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.kb-access-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px 12px;
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
color: #86909c;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.kb-access-label {
|
||||
color: #4e5969;
|
||||
}
|
||||
|
||||
.kb-access-role {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.kb-access-permission-tip {
|
||||
cursor: help;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.kb-access-permission-tip:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.kb-access-sep {
|
||||
color: #c9ced6;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.kb-access-source,
|
||||
.kb-access-updated {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: #86909c;
|
||||
}
|
||||
|
||||
.kb-access-item-icon {
|
||||
font-size: 14px;
|
||||
color: #86909c;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.kb-access-org-icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
flex-shrink: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2378,7 +2333,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
|
||||
.faq-manager-wrapper {
|
||||
flex: 1;
|
||||
padding: 24px 44px;
|
||||
padding: 24px 30px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -2425,7 +2380,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.doc-card-list {
|
||||
box-sizing: border-box;
|
||||
display: grid;
|
||||
gap: 20px;
|
||||
gap: 12px;
|
||||
align-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -2546,18 +2501,18 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.card-draft {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 0;
|
||||
gap: 8px;
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.card-draft-tip {
|
||||
color: #b05b00;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.knowledge-card {
|
||||
border: 2px solid #fbfbfb;
|
||||
height: 174px;
|
||||
height: 132px;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
@@ -2567,26 +2522,26 @@ async function createNewSession(value: string): Promise<void> {
|
||||
cursor: pointer;
|
||||
|
||||
.card-content {
|
||||
padding: 10px 20px 23px;
|
||||
padding: 10px 14px 12px;
|
||||
}
|
||||
|
||||
.card-analyze {
|
||||
height: 66px;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.card-analyze-loading {
|
||||
display: block;
|
||||
color: #07c05f;
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.card-analyze-txt {
|
||||
color: #07c05f;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
margin-left: 9px;
|
||||
font-size: 11px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.failure {
|
||||
@@ -2596,27 +2551,27 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.card-content-nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.card-content-title {
|
||||
width: 200px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #000000e6;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.more-wrap {
|
||||
display: flex;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 3px;
|
||||
@@ -2628,8 +2583,8 @@ async function createNewSession(value: string): Promise<void> {
|
||||
}
|
||||
|
||||
.more {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.active-more {
|
||||
@@ -2639,22 +2594,22 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.card-content-txt {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
line-clamp: 3;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
overflow: hidden;
|
||||
color: #00000066;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.card-bottom {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding: 0 20px;
|
||||
padding: 0 14px;
|
||||
box-sizing: border-box;
|
||||
height: 32px;
|
||||
height: 28px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -2665,7 +2620,7 @@ async function createNewSession(value: string): Promise<void> {
|
||||
.card-time {
|
||||
color: #00000066;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@@ -2744,31 +2699,31 @@ async function createNewSession(value: string): Promise<void> {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* 小屏幕平板 - 2列 */
|
||||
/* 小屏幕平板 - 3列,卡片更窄 */
|
||||
@media (min-width: 900px) {
|
||||
.doc-card-list {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* 中等屏幕 - 3列 */
|
||||
@media (min-width: 1250px) {
|
||||
.doc-card-list {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* 中等屏幕 - 3列 */
|
||||
@media (min-width: 1600px) {
|
||||
/* 中等屏幕 - 4列 */
|
||||
@media (min-width: 1250px) {
|
||||
.doc-card-list {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* 大屏幕 - 4列 */
|
||||
@media (min-width: 2000px) {
|
||||
/* 宽屏 - 5列 */
|
||||
@media (min-width: 1600px) {
|
||||
.doc-card-list {
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* 大屏幕 - 6列 */
|
||||
@media (min-width: 2000px) {
|
||||
.doc-card-list {
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,43 +1,37 @@
|
||||
<template>
|
||||
<div class="kb-list-container">
|
||||
<!-- 头部 -->
|
||||
<!-- 头部:仅标题与副标题 -->
|
||||
<div class="header">
|
||||
<div class="header-title">
|
||||
<h2>{{ $t('knowledgeBase.title') }}</h2>
|
||||
<p class="header-subtitle">{{ $t('knowledgeList.subtitle') }}</p>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<t-button class="kb-create-btn" @click="handleCreateKnowledgeBase">
|
||||
<template #icon><t-icon name="folder-add" /></template>
|
||||
{{ $t('knowledgeList.create') }}
|
||||
</t-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Tab 切换(下划线式,替代分隔线) -->
|
||||
<div class="kb-tabs">
|
||||
<div
|
||||
class="tab-item"
|
||||
:class="{ 'active': activeTab === 'all' }"
|
||||
@click="activeTab = 'all'"
|
||||
|
||||
<!-- 左侧菜单 + 主内容 -->
|
||||
<div class="kb-list-body">
|
||||
<ListSpaceSidebar
|
||||
v-model="spaceSelection"
|
||||
:count-all="allKnowledgeBases"
|
||||
:count-mine="kbs.length"
|
||||
:count-by-org="sharedCountByOrg"
|
||||
>
|
||||
{{ $t('knowledgeList.tabs.all') }} ({{ allKnowledgeBases }})
|
||||
</div>
|
||||
<div
|
||||
class="tab-item"
|
||||
:class="{ 'active': activeTab === 'mine' }"
|
||||
@click="activeTab = 'mine'"
|
||||
>
|
||||
{{ $t('knowledgeList.tabs.myKnowledgeBases') }} ({{ kbs.length }})
|
||||
</div>
|
||||
<div
|
||||
class="tab-item"
|
||||
:class="{ 'active': activeTab === 'shared' }"
|
||||
@click="activeTab = 'shared'"
|
||||
>
|
||||
{{ $t('knowledgeList.tabs.sharedToMe') }} ({{ sharedKbs.length }})
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #actions>
|
||||
<t-tooltip :content="$t('knowledgeList.create')" placement="top">
|
||||
<t-button
|
||||
variant="text"
|
||||
theme="default"
|
||||
class="sidebar-action-btn"
|
||||
size="small"
|
||||
:aria-label="$t('knowledgeList.create')"
|
||||
@click="handleCreateKnowledgeBase"
|
||||
>
|
||||
<template #icon><t-icon name="folder-add" size="16px" /></template>
|
||||
</t-button>
|
||||
</t-tooltip>
|
||||
</template>
|
||||
</ListSpaceSidebar>
|
||||
<div class="kb-list-main">
|
||||
<!-- 未初始化知识库提示 -->
|
||||
<div v-if="hasUninitializedKbs" class="warning-banner">
|
||||
<t-icon name="info-circle" size="16px" />
|
||||
@@ -86,8 +80,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 卡片网格 -->
|
||||
<div v-if="activeTab === 'all' && filteredKnowledgeBases.length > 0" class="kb-card-wrap">
|
||||
<!-- 卡片网格:全部 -->
|
||||
<div v-if="spaceSelection === 'all' && filteredKnowledgeBases.length > 0" class="kb-card-wrap">
|
||||
<!-- 全部:我的知识库 + 共享给我的知识库 -->
|
||||
<template v-for="kb in filteredKnowledgeBases" :key="kb.id">
|
||||
<!-- 我的知识库卡片 -->
|
||||
@@ -246,7 +240,7 @@
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div v-if="activeTab === 'mine' && kbs.length > 0" class="kb-card-wrap">
|
||||
<div v-if="spaceSelection === 'mine' && kbs.length > 0" class="kb-card-wrap">
|
||||
<!-- 我的知识库 -->
|
||||
<div
|
||||
v-for="(kb, index) in kbs"
|
||||
@@ -346,10 +340,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 共享给我的知识库 -->
|
||||
<div v-if="activeTab === 'shared' && sharedKbs.length > 0" class="kb-card-wrap">
|
||||
<!-- 按空间筛选:该空间下共享给我的知识库 -->
|
||||
<div v-if="spaceSelectionOrgId && sharedKbsByOrg.length > 0" class="kb-card-wrap">
|
||||
<div
|
||||
v-for="shared in sharedKbs"
|
||||
v-for="shared in sharedKbsByOrg"
|
||||
:key="'shared-' + shared.share_id"
|
||||
class="kb-card shared-kb-card"
|
||||
:class="{
|
||||
@@ -399,26 +393,36 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 全部 Tab 空状态 -->
|
||||
<div v-if="activeTab === 'all' && filteredKnowledgeBases.length === 0 && !loading" class="empty-state">
|
||||
<!-- 全部空状态 -->
|
||||
<div v-if="spaceSelection === 'all' && filteredKnowledgeBases.length === 0 && !loading" class="empty-state">
|
||||
<img class="empty-img" src="@/assets/img/upload.svg" alt="">
|
||||
<span class="empty-txt">{{ $t('knowledgeList.empty.title') }}</span>
|
||||
<span class="empty-desc">{{ $t('knowledgeList.empty.description') }}</span>
|
||||
<t-button class="kb-create-btn empty-state-btn" @click="handleCreateKnowledgeBase">
|
||||
<template #icon><t-icon name="folder-add" /></template>
|
||||
{{ $t('knowledgeList.create') }}
|
||||
</t-button>
|
||||
</div>
|
||||
|
||||
<!-- 我的知识库空状态 -->
|
||||
<div v-if="activeTab === 'mine' && kbs.length === 0 && !loading" class="empty-state">
|
||||
<div v-if="spaceSelection === 'mine' && kbs.length === 0 && !loading" class="empty-state">
|
||||
<img class="empty-img" src="@/assets/img/upload.svg" alt="">
|
||||
<span class="empty-txt">{{ $t('knowledgeList.empty.title') }}</span>
|
||||
<span class="empty-desc">{{ $t('knowledgeList.empty.description') }}</span>
|
||||
<t-button class="kb-create-btn empty-state-btn" @click="handleCreateKnowledgeBase">
|
||||
<template #icon><t-icon name="folder-add" /></template>
|
||||
{{ $t('knowledgeList.create') }}
|
||||
</t-button>
|
||||
</div>
|
||||
|
||||
<!-- 共享知识库空状态 -->
|
||||
<div v-if="activeTab === 'shared' && sharedKbs.length === 0 && !loading" class="empty-state">
|
||||
<!-- 空间下共享知识库空状态 -->
|
||||
<div v-if="spaceSelectionOrgId && sharedKbsByOrg.length === 0 && !loading" class="empty-state">
|
||||
<img class="empty-img" src="@/assets/img/upload.svg" alt="">
|
||||
<span class="empty-txt">{{ $t('knowledgeList.empty.sharedTitle') || '暂无共享知识库' }}</span>
|
||||
<span class="empty-desc">{{ $t('knowledgeList.empty.sharedDescription') || '您可以加入组织或请求他人共享知识库给您' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 删除确认对话框 -->
|
||||
<t-dialog
|
||||
@@ -521,6 +525,7 @@ import { useOrganizationStore } from '@/stores/organization'
|
||||
import type { SharedKnowledgeBase } from '@/api/organization'
|
||||
import KnowledgeBaseEditorModal from './KnowledgeBaseEditorModal.vue'
|
||||
import ShareKnowledgeBaseDialog from '@/components/ShareKnowledgeBaseDialog.vue'
|
||||
import ListSpaceSidebar from '@/components/ListSpaceSidebar.vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const router = useRouter()
|
||||
@@ -529,8 +534,8 @@ const uiStore = useUIStore()
|
||||
const orgStore = useOrganizationStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
// Tab 状态
|
||||
const activeTab = ref<'all' | 'mine' | 'shared'>('all')
|
||||
// 左侧空间选择:全部 / 我的 / 空间 ID
|
||||
const spaceSelection = ref<'all' | 'mine' | string>('all')
|
||||
|
||||
interface KB {
|
||||
id: string;
|
||||
@@ -575,17 +580,42 @@ const sharedKbs = computed<SharedKnowledgeBase[]>(() => orgStore.sharedKnowledge
|
||||
// All knowledge bases (mine + shared to me)
|
||||
const allKnowledgeBases = computed(() => kbs.value.length + sharedKbs.value.length)
|
||||
|
||||
// Filtered knowledge bases based on active tab
|
||||
// 当前选中的是空间 ID(非全部、非我的)
|
||||
const spaceSelectionOrgId = computed(() => {
|
||||
const s = spaceSelection.value
|
||||
return s !== 'all' && s !== 'mine' && !!s
|
||||
})
|
||||
|
||||
// 当前空间下共享给我的知识库
|
||||
const sharedKbsByOrg = computed(() => {
|
||||
const orgId = spaceSelection.value
|
||||
if (orgId === 'all' || orgId === 'mine') return []
|
||||
return sharedKbs.value.filter(s => s.organization_id === orgId)
|
||||
})
|
||||
|
||||
// 各空间下的共享知识库数量(用于侧栏展示)
|
||||
const sharedCountByOrg = computed<Record<string, number>>(() => {
|
||||
const map: Record<string, number> = {}
|
||||
sharedKbs.value.forEach(s => {
|
||||
const id = s.organization_id
|
||||
if (!id) return
|
||||
map[id] = (map[id] || 0) + 1
|
||||
})
|
||||
return map
|
||||
})
|
||||
|
||||
// Filtered knowledge bases: 全部 = 我的 + 全部共享;我的 = 仅我的
|
||||
const filteredKnowledgeBases = computed(() => {
|
||||
if (activeTab.value === 'mine') return []
|
||||
if (activeTab.value === 'shared') return []
|
||||
// activeTab === 'all'
|
||||
if (spaceSelection.value === 'mine') {
|
||||
return kbs.value.map(kb => ({ ...kb, isMine: true as const }))
|
||||
}
|
||||
if (spaceSelection.value !== 'all') {
|
||||
return []
|
||||
}
|
||||
const result: Array<(KB & { isMine: true }) | (SharedKnowledgeBase['knowledge_base'] & { isMine: false; permission: string; shared_at: string; share_id: string } & any)> = []
|
||||
// Add my knowledge bases
|
||||
kbs.value.forEach(kb => {
|
||||
result.push({ ...kb, isMine: true as const })
|
||||
})
|
||||
// Add shared knowledge bases (skip entries where knowledge_base is null, e.g. deleted KB)
|
||||
sharedKbs.value.forEach(shared => {
|
||||
const kb = shared.knowledge_base
|
||||
if (!kb) return
|
||||
@@ -1000,13 +1030,14 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
|
||||
<style scoped lang="less">
|
||||
.kb-list-container {
|
||||
padding: 24px 44px;
|
||||
// background: #fff;
|
||||
padding: 24px 10px;
|
||||
margin: 0 20px;
|
||||
height: calc(100vh);
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.header {
|
||||
@@ -1030,23 +1061,36 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.kb-create-btn {
|
||||
background: linear-gradient(135deg, #07c05f 0%, #00a67e 100%);
|
||||
border: none;
|
||||
color: #fff;
|
||||
.kb-create-btn {
|
||||
background: linear-gradient(135deg, #07c05f 0%, #00a67e 100%);
|
||||
border: none;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(135deg, #05a04f 0%, #008a6a 100%);
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
background: linear-gradient(135deg, #05a04f 0%, #008a6a 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.kb-list-body {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
background: #fff;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.kb-list-main {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.header-subtitle {
|
||||
margin: 0;
|
||||
color: #00000099;
|
||||
@@ -1056,7 +1100,7 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
// Tab 切换样式(下划线式,简洁清晰)
|
||||
// Tab 切换样式(已由左侧菜单替代,保留以备兼容)
|
||||
.kb-tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1326,13 +1370,13 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
|
||||
.kb-card-wrap {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
gap: 12px;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.kb-card {
|
||||
border: 1px solid #f0f0f0;
|
||||
border-radius: 12px;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
|
||||
@@ -1340,10 +1384,10 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
padding: 16px 18px;
|
||||
padding: 12px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 160px;
|
||||
height: 132px;
|
||||
|
||||
&:hover {
|
||||
border-color: #07c05f;
|
||||
@@ -1370,10 +1414,10 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: linear-gradient(135deg, rgba(7, 192, 95, 0.08) 0%, transparent 100%);
|
||||
border-radius: 0 12px 0 100%;
|
||||
border-radius: 0 10px 0 100%;
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
@@ -1396,10 +1440,10 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: linear-gradient(135deg, rgba(0, 82, 217, 0.08) 0%, transparent 100%);
|
||||
border-radius: 0 12px 0 100%;
|
||||
border-radius: 0 10px 0 100%;
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
@@ -1418,11 +1462,11 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.card-title {
|
||||
flex: 1;
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
white-space: nowrap;
|
||||
@@ -1430,13 +1474,13 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.card-more-btn {
|
||||
flex-shrink: 0;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -1459,9 +1503,9 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
.card-title {
|
||||
color: #1a1a1a;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 15px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 22px;
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -1471,8 +1515,8 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
|
||||
.more-wrap {
|
||||
display: flex;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 6px;
|
||||
@@ -1496,18 +1540,18 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
}
|
||||
|
||||
.more-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-content {
|
||||
flex: 1;
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 8px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.card-description {
|
||||
@@ -1518,9 +1562,9 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 13px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.card-bottom {
|
||||
@@ -1528,7 +1572,7 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: auto;
|
||||
padding-top: 12px;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
@@ -1562,9 +1606,9 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-radius: 6px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 5px;
|
||||
cursor: default;
|
||||
transition: background 0.2s ease;
|
||||
|
||||
@@ -1572,15 +1616,15 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
background: rgba(7, 192, 95, 0.08);
|
||||
color: #059669;
|
||||
width: auto;
|
||||
padding: 0 8px;
|
||||
gap: 4px;
|
||||
padding: 0 6px;
|
||||
gap: 3px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(7, 192, 95, 0.12);
|
||||
}
|
||||
|
||||
.badge-count {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -1593,15 +1637,15 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
background: rgba(0, 82, 217, 0.08);
|
||||
color: #0052d9;
|
||||
width: auto;
|
||||
padding: 0 8px;
|
||||
gap: 4px;
|
||||
padding: 0 6px;
|
||||
gap: 3px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 82, 217, 0.12);
|
||||
}
|
||||
|
||||
.badge-count {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -1744,6 +1788,11 @@ const handleUploadFinishedEvent = (event: Event) => {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.empty-state-btn {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,27 @@
|
||||
<t-icon name="chevron-right" class="breadcrumb-separator" />
|
||||
<span class="breadcrumb-current">{{ $t('knowledgeEditor.faq.title') }}</span>
|
||||
</h2>
|
||||
<!-- 身份与最后更新:紧凑单行,置于标题行右侧,悬停显示权限说明 -->
|
||||
<div v-if="kbInfo" class="faq-access-meta">
|
||||
<t-tooltip :content="accessPermissionSummary" placement="top">
|
||||
<span class="faq-access-meta-inner">
|
||||
<t-tag size="small" :theme="isOwner ? 'success' : (currentSharedKb?.permission === 'admin' ? 'primary' : currentSharedKb?.permission === 'editor' ? 'warning' : 'default')" class="faq-access-role-tag">
|
||||
{{ accessRoleLabel }}
|
||||
</t-tag>
|
||||
<template v-if="currentSharedKb">
|
||||
<span class="faq-access-meta-sep">·</span>
|
||||
<span class="faq-access-meta-text">
|
||||
{{ $t('knowledgeBase.accessInfo.fromOrg') }}「{{ currentSharedKb.org_name }}」
|
||||
{{ $t('knowledgeBase.accessInfo.sharedAt') }} {{ formatImportTime(currentSharedKb.shared_at) }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="kbLastUpdated">
|
||||
<span class="faq-access-meta-sep">·</span>
|
||||
<span class="faq-access-meta-text">{{ $t('knowledgeBase.accessInfo.lastUpdated') }} {{ kbLastUpdated }}</span>
|
||||
</template>
|
||||
</span>
|
||||
</t-tooltip>
|
||||
</div>
|
||||
<t-tooltip v-if="canManage" :content="$t('knowledgeBase.settings')" placement="top">
|
||||
<button
|
||||
type="button"
|
||||
@@ -50,49 +71,6 @@
|
||||
</t-tooltip>
|
||||
</div>
|
||||
<p class="faq-subtitle">{{ $t('knowledgeEditor.faq.subtitle') }}</p>
|
||||
<!-- 当前知识库权限与来源信息 -->
|
||||
<div v-if="kbInfo" class="faq-access-info">
|
||||
<span class="faq-access-role">
|
||||
<t-icon name="user" class="faq-access-item-icon" />
|
||||
<span class="faq-access-label">{{ $t('knowledgeBase.accessInfo.myRole') }}:</span>
|
||||
<t-tag size="small" :theme="isOwner ? 'success' : (currentSharedKb?.permission === 'admin' ? 'primary' : currentSharedKb?.permission === 'editor' ? 'warning' : 'default')">
|
||||
{{ accessRoleLabel }}
|
||||
</t-tag>
|
||||
<t-tooltip :content="accessPermissionSummary" placement="top">
|
||||
<t-icon name="help-circle" class="faq-access-item-icon faq-access-permission-tip" />
|
||||
</t-tooltip>
|
||||
</span>
|
||||
<template v-if="currentSharedKb">
|
||||
<span class="faq-access-sep">·</span>
|
||||
<span class="faq-access-source">
|
||||
<img src="@/assets/img/organization-green.svg" class="faq-access-org-icon" alt="" aria-hidden="true" />
|
||||
{{ $t('knowledgeBase.accessInfo.fromOrg') }}「{{ currentSharedKb.org_name }}」
|
||||
<t-icon name="time" class="faq-access-item-icon" />
|
||||
{{ $t('knowledgeBase.accessInfo.sharedAt') }} {{ formatImportTime(currentSharedKb.shared_at) }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-else-if="kbLastUpdated">
|
||||
<span class="faq-access-sep">·</span>
|
||||
<span class="faq-access-updated">
|
||||
<t-icon name="time" class="faq-access-item-icon" />
|
||||
{{ $t('knowledgeBase.accessInfo.lastUpdated') }} {{ kbLastUpdated }}
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="faq-header-actions">
|
||||
<t-dropdown
|
||||
:options="faqActionOptions"
|
||||
trigger="click"
|
||||
placement="bottom-right"
|
||||
@click="handleFaqAction"
|
||||
>
|
||||
<t-button class="faq-action-btn dropdown-action-btn">
|
||||
<template #icon><t-icon name="help-circle" /></template>
|
||||
<span>{{ $t('knowledgeEditor.faq.manageFaq') }}</span>
|
||||
<t-icon name="chevron-down" size="14px" class="dropdown-arrow" />
|
||||
</t-button>
|
||||
</t-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -366,12 +344,13 @@
|
||||
</aside>
|
||||
|
||||
<div class="faq-card-area">
|
||||
<!-- 搜索栏 -->
|
||||
<!-- 搜索栏与管理 FAQ -->
|
||||
<div class="faq-search-bar">
|
||||
<t-input
|
||||
v-model.trim="entrySearchKeyword"
|
||||
:placeholder="$t('knowledgeEditor.faq.searchPlaceholder')"
|
||||
clearable
|
||||
class="faq-search-input"
|
||||
@clear="loadEntries()"
|
||||
@keydown.enter="loadEntries()"
|
||||
>
|
||||
@@ -379,6 +358,35 @@
|
||||
<t-icon name="search" size="16px" />
|
||||
</template>
|
||||
</t-input>
|
||||
<div class="faq-search-actions">
|
||||
<!-- 新建:新建条目 / 导入 -->
|
||||
<template v-if="faqCreateOptions.length">
|
||||
<t-tooltip :content="$t('knowledgeEditor.faq.createGroup')" placement="top">
|
||||
<t-dropdown
|
||||
:options="faqCreateOptions"
|
||||
trigger="click"
|
||||
placement="bottom-right"
|
||||
@click="handleFaqAction"
|
||||
>
|
||||
<t-button variant="text" theme="default" class="content-bar-icon-btn" size="small">
|
||||
<template #icon><t-icon name="add" size="16px" /></template>
|
||||
</t-button>
|
||||
</t-dropdown>
|
||||
</t-tooltip>
|
||||
</template>
|
||||
<!-- 导出 -->
|
||||
<t-tooltip :content="$t('knowledgeEditor.faqExport.exportButton')" placement="top">
|
||||
<t-button variant="text" theme="default" class="content-bar-icon-btn" size="small" @click="handleFaqAction({ value: 'export' })">
|
||||
<template #icon><t-icon name="download" size="16px" /></template>
|
||||
</t-button>
|
||||
</t-tooltip>
|
||||
<!-- 检索 -->
|
||||
<t-tooltip :content="$t('knowledgeEditor.faq.searchTest')" placement="top">
|
||||
<t-button variant="text" theme="default" class="content-bar-icon-btn" size="small" @click="handleFaqAction({ value: 'search' })">
|
||||
<template #icon><t-icon name="search" size="16px" /></template>
|
||||
</t-button>
|
||||
</t-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Card List Container with Scroll -->
|
||||
<div ref="scrollContainer" class="faq-scroll-container" @scroll="handleScroll">
|
||||
@@ -1321,25 +1329,13 @@ const kbLastUpdated = computed(() => {
|
||||
return formatImportTime(raw)
|
||||
})
|
||||
|
||||
// FAQ 操作下拉选项
|
||||
const faqActionOptions = computed(() => {
|
||||
const options = []
|
||||
|
||||
// 编辑权限相关操作
|
||||
if (canEdit.value) {
|
||||
options.push(
|
||||
{ content: t('knowledgeEditor.faq.editorCreate'), value: 'create', prefixIcon: () => h(TIcon, { name: 'add', size: '16px' }) },
|
||||
{ content: t('knowledgeEditor.faqImport.importButton'), value: 'import', prefixIcon: () => h(TIcon, { name: 'upload', size: '16px' }) },
|
||||
)
|
||||
}
|
||||
|
||||
// 通用操作
|
||||
options.push(
|
||||
{ content: t('knowledgeEditor.faq.searchTest'), value: 'search', prefixIcon: () => h(TIcon, { name: 'search', size: '16px' }) },
|
||||
{ content: t('knowledgeEditor.faqExport.exportButton'), value: 'export', prefixIcon: () => h(TIcon, { name: 'download', size: '16px' }) },
|
||||
)
|
||||
|
||||
return options
|
||||
// FAQ 操作:新建组(新建条目 + 导入)
|
||||
const faqCreateOptions = computed(() => {
|
||||
if (!canEdit.value) return []
|
||||
return [
|
||||
{ content: t('knowledgeEditor.faq.editorCreate'), value: 'create', prefixIcon: () => h(TIcon, { name: 'add', size: '16px' }) },
|
||||
{ content: t('knowledgeEditor.faqImport.importButton'), value: 'import', prefixIcon: () => h(TIcon, { name: 'upload', size: '16px' }) },
|
||||
]
|
||||
})
|
||||
|
||||
// 处理 FAQ 操作
|
||||
@@ -3329,19 +3325,22 @@ watch(() => entries.value.map(e => ({
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
// 与列表页一致:整体一块白底圆角区,左侧标签栏为内部分区
|
||||
.faq-main {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
background: #fff;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.faq-tag-panel {
|
||||
width: 230px;
|
||||
background: #fff;
|
||||
border: 1px solid #e7ebf0;
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
width: 176px;
|
||||
background: #fafbfc;
|
||||
border-right: 1px solid #e7ebf0;
|
||||
padding: 12px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -3363,35 +3362,36 @@ watch(() => entries.value.map(e => ({
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 8px;
|
||||
color: #1d2129;
|
||||
|
||||
.sidebar-title {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 4px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
|
||||
.sidebar-count {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
color: #86909c;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
color: #c9ced6;
|
||||
|
||||
.create-tag-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #00a870;
|
||||
line-height: 1;
|
||||
@@ -3408,8 +3408,8 @@ watch(() => entries.value.map(e => ({
|
||||
}
|
||||
|
||||
.sidebar-action-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -3426,26 +3426,34 @@ watch(() => entries.value.map(e => ({
|
||||
}
|
||||
|
||||
.tag-search-bar {
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 8px;
|
||||
|
||||
:deep(.t-input) {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
background-color: #f7f9fc;
|
||||
border-color: #e5e9f2;
|
||||
}
|
||||
|
||||
:deep(.t-input__inner) {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
:deep(.t-input__prefix-icon) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.faq-tag-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
|
||||
.tag-loading-more {
|
||||
padding: 12px 0;
|
||||
padding: 8px 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
@@ -3455,24 +3463,24 @@ watch(() => entries.value.map(e => ({
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 10px;
|
||||
padding: 6px 8px;
|
||||
border-radius: 6px;
|
||||
color: #4e5969;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
font-size: 13px;
|
||||
font-size: 12px;
|
||||
|
||||
.faq-tag-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
|
||||
.t-icon {
|
||||
flex-shrink: 0;
|
||||
color: #86909c;
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
}
|
||||
@@ -3489,18 +3497,18 @@ watch(() => entries.value.map(e => ({
|
||||
.faq-tag-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-left: 8px;
|
||||
gap: 5px;
|
||||
margin-left: 6px;
|
||||
min-width: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.faq-tag-count {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
color: #86909c;
|
||||
font-weight: 500;
|
||||
padding: 2px 6px;
|
||||
border-radius: 10px;
|
||||
padding: 2px 5px;
|
||||
border-radius: 8px;
|
||||
background: #f7f9fc;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
@@ -3639,8 +3647,8 @@ watch(() => entries.value.map(e => ({
|
||||
}
|
||||
|
||||
.tag-more-btn {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -3663,17 +3671,17 @@ watch(() => entries.value.map(e => ({
|
||||
}
|
||||
|
||||
.tag-more-placeholder {
|
||||
width: 24px; // Same width as tag-more-btn
|
||||
height: 24px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.tag-empty-state {
|
||||
text-align: center;
|
||||
padding: 12px 8px;
|
||||
padding: 10px 6px;
|
||||
color: #a1a7b3;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3684,11 +3692,37 @@ watch(() => entries.value.map(e => ({
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.faq-search-bar {
|
||||
padding: 0px 0px 10px 0px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
|
||||
.faq-search-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.faq-search-actions {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
:deep(.content-bar-icon-btn) {
|
||||
color: #86909c;
|
||||
background: transparent;
|
||||
border: none;
|
||||
&:hover {
|
||||
color: #4e5969;
|
||||
background: #f2f3f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.t-input) {
|
||||
font-size: 13px;
|
||||
@@ -3703,6 +3737,10 @@ watch(() => entries.value.map(e => ({
|
||||
border-color: #00a870;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.t-input__prefix-icon) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.tag-menu) {
|
||||
@@ -3747,13 +3785,11 @@ watch(() => entries.value.map(e => ({
|
||||
|
||||
.faq-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
padding: 0 0 16px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid #e7ebf0;
|
||||
gap: 12px;
|
||||
margin-bottom: 12px;
|
||||
flex-shrink: 0;
|
||||
|
||||
.faq-header-title {
|
||||
@@ -3769,6 +3805,32 @@ watch(() => entries.value.map(e => ({
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.faq-access-meta {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.faq-access-meta-inner {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 12px;
|
||||
color: #86909c;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.faq-access-role-tag {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.faq-access-meta-sep {
|
||||
color: #c9ced6;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.faq-access-meta-text {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.faq-breadcrumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -3846,91 +3908,8 @@ watch(() => entries.value.map(e => ({
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.faq-access-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px 12px;
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
color: #86909c;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.faq-access-label {
|
||||
color: #4e5969;
|
||||
}
|
||||
|
||||
.faq-access-role {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.faq-access-permission-tip {
|
||||
cursor: help;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.faq-access-permission-tip:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.faq-access-item-icon {
|
||||
font-size: 14px;
|
||||
color: #86909c;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.faq-access-sep {
|
||||
color: #c9ced6;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.faq-access-source,
|
||||
.faq-access-updated {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: #86909c;
|
||||
}
|
||||
|
||||
.faq-access-org-icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
flex-shrink: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.faq-header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-shrink: 0;
|
||||
|
||||
.faq-action-btn {
|
||||
background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
|
||||
border: none;
|
||||
color: #fff;
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(135deg, #00897b 0%, #00796b 100%);
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.dropdown-action-btn) {
|
||||
.t-button__text {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dropdown-arrow {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 导入进度条样式(显示在列表页面顶部)
|
||||
.faq-import-progress-bar {
|
||||
@@ -4237,21 +4216,20 @@ watch(() => entries.value.map(e => ({
|
||||
|
||||
.faq-card {
|
||||
border: 1px solid #E7E7E7;
|
||||
border-radius: 12px;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
padding: 12px;
|
||||
padding: 10px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
|
||||
box-sizing: border-box;
|
||||
height: fit-content; // 高度根据内容自适应
|
||||
// 注意:top 和 left 的 transition 由 JS 动态控制,避免与布局动画冲突
|
||||
height: fit-content;
|
||||
|
||||
&:hover {
|
||||
border-color: #07C05F;
|
||||
@@ -4268,8 +4246,8 @@ watch(() => entries.value.map(e => ({
|
||||
.faq-card-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding-bottom: 12px;
|
||||
gap: 8px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #F3F4F6;
|
||||
position: relative;
|
||||
}
|
||||
@@ -4277,13 +4255,13 @@ watch(() => entries.value.map(e => ({
|
||||
.faq-header-top {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.faq-card-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
margin-left: auto;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@@ -4292,28 +4270,28 @@ watch(() => entries.value.map(e => ({
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding-top: 6px;
|
||||
gap: 8px;
|
||||
padding-top: 5px;
|
||||
border-top: 1px dashed #F3F4F6;
|
||||
}
|
||||
|
||||
.faq-meta-item {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
gap: 6px;
|
||||
padding: 4px 10px;
|
||||
gap: 5px;
|
||||
padding: 3px 8px;
|
||||
border-radius: 999px;
|
||||
background: #F9FAFB;
|
||||
border: 1px solid #EEF2F7;
|
||||
|
||||
.meta-label {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
color: #6B7280;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.meta-value {
|
||||
font-size: 13px;
|
||||
font-size: 12px;
|
||||
color: #111827;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -4323,9 +4301,9 @@ watch(() => entries.value.map(e => ({
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 10px 16px;
|
||||
margin: 0 -16px -12px;
|
||||
gap: 6px;
|
||||
padding: 8px 12px;
|
||||
margin: 0 -10px -10px;
|
||||
background: rgba(48, 50, 54, 0.02);
|
||||
border-top: 1px solid #f5f5f5;
|
||||
flex-wrap: nowrap;
|
||||
@@ -4334,7 +4312,7 @@ watch(() => entries.value.map(e => ({
|
||||
.faq-card-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
gap: 5px;
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
@@ -4342,17 +4320,17 @@ watch(() => entries.value.map(e => ({
|
||||
.status-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 10px;
|
||||
gap: 5px;
|
||||
padding: 3px 8px;
|
||||
border-radius: 999px;
|
||||
background: #F9FAFB;
|
||||
border: 1px solid #EEF2F7;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
color: #4B5563;
|
||||
font-family: "PingFang SC";
|
||||
|
||||
.status-icon {
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
color: #9CA3AF;
|
||||
|
||||
&.warning {
|
||||
@@ -4409,14 +4387,14 @@ watch(() => entries.value.map(e => ({
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
max-width: 140px;
|
||||
height: 22px;
|
||||
max-width: 120px;
|
||||
height: 20px;
|
||||
border-radius: 4px;
|
||||
border-color: #e5e7eb;
|
||||
color: #00000066;
|
||||
padding: 0 8px;
|
||||
padding: 0 6px;
|
||||
background: #3032360f;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
font-family: "PingFang SC";
|
||||
transition: all 0.2s ease;
|
||||
@@ -4435,11 +4413,11 @@ watch(() => entries.value.map(e => ({
|
||||
cursor: pointer;
|
||||
|
||||
.tag-text {
|
||||
max-width: 120px;
|
||||
max-width: 100px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 400;
|
||||
color: #00000066;
|
||||
}
|
||||
@@ -4531,36 +4509,36 @@ watch(() => entries.value.map(e => ({
|
||||
.faq-card-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
contain: layout; // 优化渲染性能
|
||||
contain: layout;
|
||||
}
|
||||
|
||||
.faq-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
|
||||
.faq-section-label {
|
||||
color: #6B7280;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-bottom: 2px;
|
||||
gap: 5px;
|
||||
margin-bottom: 1px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 3px;
|
||||
height: 12px;
|
||||
height: 10px;
|
||||
background: #07C05F;
|
||||
border-radius: 2px;
|
||||
flex-shrink: 0;
|
||||
@@ -4583,7 +4561,7 @@ watch(() => entries.value.map(e => ({
|
||||
}
|
||||
|
||||
.collapse-icon {
|
||||
font-size: 14px;
|
||||
font-size: 13px;
|
||||
color: #9CA3AF;
|
||||
flex-shrink: 0;
|
||||
margin-left: auto; // 让箭头靠右对齐
|
||||
@@ -4612,8 +4590,8 @@ watch(() => entries.value.map(e => ({
|
||||
.faq-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
min-height: 20px;
|
||||
gap: 5px;
|
||||
min-height: 18px;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
@@ -4633,11 +4611,11 @@ watch(() => entries.value.map(e => ({
|
||||
}
|
||||
|
||||
.question-tag {
|
||||
font-size: 12px;
|
||||
padding: 4px 10px;
|
||||
font-size: 11px;
|
||||
padding: 3px 8px;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
border-radius: 6px;
|
||||
border-radius: 5px;
|
||||
font-family: "PingFang SC";
|
||||
flex: 0 1 auto;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user