- 更新了 KnowledgeDatabase 和 KnowledgeFile 的 to_dict 方法,支持选择性加载节点信息。 - 在 KnowledgeBase 中调整了数据库获取逻辑,确保在获取数据库时不加载文件节点。 - 在前端组件中添加了加载状态指示,改善了用户体验。 - 增强了数据库信息视图的交互性,支持批量索引和删除文件功能。
74 lines
1.3 KiB
Vue
74 lines
1.3 KiB
Vue
<template>
|
|
<div class="header-container">
|
|
<div class="header-content">
|
|
<div class="header-title">
|
|
<h1>{{ title }}</h1>
|
|
<slot name="description">
|
|
<p v-if="description">{{ description }}</p>
|
|
</slot>
|
|
</div>
|
|
<div class="header-actions" v-if="$slots.actions">
|
|
<loading-outlined v-if="loading" />
|
|
<slot name="actions"></slot>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { LoadingOutlined } from '@ant-design/icons-vue';
|
|
const props = defineProps({
|
|
title: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
description: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
loading: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
.header-container {
|
|
background-color: rgba(255, 255, 255, 0.8);
|
|
backdrop-filter: blur(10px);
|
|
padding: 16px 24px;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.header-title {
|
|
font-size: 14px;
|
|
color: rgba(0, 0, 0, 0.45);
|
|
|
|
h1 {
|
|
margin: 0;
|
|
font-size: 20px;
|
|
font-weight: 500;
|
|
color: rgba(0, 0, 0, 0.85);
|
|
}
|
|
|
|
p {
|
|
margin: 8px 0 0;
|
|
}
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
</style>
|