feat:完成dify知识库文档基础CRUD模块
This commit is contained in:
@@ -1,91 +0,0 @@
|
||||
/**
|
||||
* 寓¡h - ‡ch7
|
||||
*/
|
||||
|
||||
/* åw */
|
||||
.document-list-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 16px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.document-list-search {
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
.document-list-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* h<7 */
|
||||
.document-table {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.document-table .ant-table-thead > tr > th {
|
||||
background-color: #fafafa;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.document-table .ant-table-tbody > tr:hover > td {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
/* ‡c
|
||||
ð */
|
||||
.document-name-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.document-name-cell .anticon {
|
||||
color: #999;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.document-name-cell span {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* ¶~ */
|
||||
.document-status-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* Í\ ® */
|
||||
.document-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* z¶ */
|
||||
.document-list-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 60px 20px;
|
||||
}
|
||||
|
||||
/* Í”@ */
|
||||
@media (max-width: 991px) {
|
||||
.document-list-toolbar {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.document-list-search {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.document-list-actions {
|
||||
justify-content: space-between;
|
||||
}
|
||||
@@ -1,46 +1,29 @@
|
||||
/**
|
||||
* 寓¡h - ;@7
|
||||
* 知识库管理器 - 白色卡片风格
|
||||
*/
|
||||
|
||||
.dataset-manager-page {
|
||||
/* 外层容器 - 直接占满,与大模型对话一致 */
|
||||
.dataset-manager-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #f5f7f9;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
/* 卡片容器 - 无边框阴影,直接融入 */
|
||||
.dataset-manager-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
background: #fff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dataset-manager-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
background-color: #f5f7f9;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* z¶¹h */
|
||||
.dataset-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
padding: 40px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.dataset-empty h3 {
|
||||
margin-bottom: 8px;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.dataset-empty p {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* }¶¹h */
|
||||
.dataset-loading {
|
||||
/* 加载状态 */
|
||||
.dataset-loading-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@@ -49,25 +32,70 @@
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
/* ;…¹:ß */
|
||||
.dataset-loading-state .loading-text {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Spin 组件主题色 */
|
||||
.dataset-loading-state .ant-spin .ant-spin-dot-item,
|
||||
.dataset-loading .ant-spin .ant-spin-dot-item {
|
||||
background-color: rgb(0 104 74);
|
||||
}
|
||||
|
||||
/* 错误状态 */
|
||||
.dataset-error-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dataset-error-state .error-icon {
|
||||
font-size: 48px;
|
||||
color: #ff4d4f;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.dataset-error-state h3 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.dataset-error-state p {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 内容区域 */
|
||||
.dataset-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
padding: 20px 24px;
|
||||
overflow: auto;
|
||||
min-height: 0;
|
||||
padding: 24px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 4è:ß */
|
||||
/* 头部区域 */
|
||||
.dataset-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
flex-shrink: 0;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.dataset-header h1 {
|
||||
font-size: 20px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
margin: 0;
|
||||
@@ -78,12 +106,115 @@
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* Í”@ */
|
||||
@media (max-width: 991px) {
|
||||
.dataset-manager-container {
|
||||
flex-direction: column;
|
||||
}
|
||||
/* 工具栏 */
|
||||
.document-list-toolbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.document-list-search {
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
.document-list-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* 表格容器 - 唯一滚动区域 */
|
||||
.document-table-container {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.document-table {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.document-table .ant-table-wrapper,
|
||||
.document-table .ant-table,
|
||||
.document-table .ant-table-container {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* 固定表头 */
|
||||
.document-table .ant-table-thead > tr > th {
|
||||
background: #fafafa;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
color: #1a1a1a;
|
||||
padding: 8px 12px !important;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* 压缩行高 */
|
||||
.document-table .ant-table-tbody > tr > td {
|
||||
padding: 6px 12px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.document-table .ant-table-tbody > tr:hover > td {
|
||||
background: #f5f7f9;
|
||||
}
|
||||
|
||||
/* 固定底部分页器 */
|
||||
.document-pagination {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 0;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
flex-shrink: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.pagination-total {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.pagination-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.pagination-info {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.dataset-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
padding: 60px 40px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 加载状态 */
|
||||
.dataset-loading {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
/* 响应式 */
|
||||
@media (max-width: 991px) {
|
||||
.dataset-content {
|
||||
padding: 16px;
|
||||
}
|
||||
@@ -98,4 +229,28 @@
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.document-list-toolbar {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.document-list-search {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.document-list-actions {
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.dataset-content {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.dataset-header h1 {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
/**
|
||||
* 知识库管理器 - 侧边栏样式
|
||||
*/
|
||||
|
||||
.dataset-sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dataset-sidebar .ant-layout-sider-children {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 侧边栏头部 */
|
||||
.dataset-sidebar-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.dataset-sidebar-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.dataset-sidebar-title h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 知识库列表 */
|
||||
.dataset-sidebar-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* 菜单样式覆盖 */
|
||||
.dataset-sidebar-menu.ant-menu {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.dataset-sidebar-menu .ant-menu-item {
|
||||
margin: 4px 8px;
|
||||
border-radius: 8px;
|
||||
height: auto;
|
||||
line-height: 1.5;
|
||||
padding: 8px 12px !important;
|
||||
}
|
||||
|
||||
.dataset-sidebar-menu .ant-menu-item-selected {
|
||||
background-color: rgba(0, 104, 74, 0.1) !important;
|
||||
}
|
||||
|
||||
.dataset-sidebar-menu .ant-menu-item-selected::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dataset-sidebar-menu .ant-menu-item:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
/* 知识库信息 */
|
||||
.dataset-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.dataset-info-name {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #1a1a1a;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.dataset-info-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.dataset-info-meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.dataset-info-meta-item .anticon {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 侧边栏底部 */
|
||||
.dataset-sidebar-footer {
|
||||
padding: 12px 16px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.stats-text {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 响应式布局 */
|
||||
@media (max-width: 991px) {
|
||||
.dataset-sidebar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
height: 100vh;
|
||||
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.dataset-sidebar.ant-layout-sider-collapsed {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user