2026-02-03 01:46:03 +08:00
|
|
|
|
<!--
|
|
|
|
|
|
* Component: RAGSimulationDemo.vue
|
2026-02-03 19:41:14 +08:00
|
|
|
|
* Description: Demonstrates the Retrieval-Augmented Generation (RAG) process with a vertical, intuitive flow.
|
2026-02-03 01:46:03 +08:00
|
|
|
|
-->
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2026-02-03 01:46:03 +08:00
|
|
|
|
import { ref, computed } from 'vue'
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
2026-02-03 01:46:03 +08:00
|
|
|
|
const query = ref('如何重置密码?')
|
2026-01-16 19:10:21 +08:00
|
|
|
|
const lastQuery = ref('')
|
|
|
|
|
|
const isSearching = ref(false)
|
2026-02-03 19:41:14 +08:00
|
|
|
|
const currentStep = ref(0) // 0: Idle, 1: Searching/Scanning, 2: Retrieved/Assembling, 3: Done
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
|
|
|
|
|
const documents = ref([
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 1,
|
2026-02-03 01:46:03 +08:00
|
|
|
|
title: '密码重置指南',
|
|
|
|
|
|
content: '用户可以通过点击设置页面的"忘记密码"链接来重置密码。系统会发送验证邮件。',
|
|
|
|
|
|
score: 0
|
2026-01-16 19:10:21 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 2,
|
2026-02-03 01:46:03 +08:00
|
|
|
|
title: '定价策略',
|
|
|
|
|
|
content: '基础版每月 $10,专业版每月 $29。企业版需要联系销售团队获取报价。',
|
|
|
|
|
|
score: 0
|
2026-01-16 19:10:21 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 3,
|
2026-02-03 01:46:03 +08:00
|
|
|
|
title: 'API 文档',
|
|
|
|
|
|
content: '所有 API 请求都需要在 Header 中包含 Bearer Token 进行身份验证。',
|
|
|
|
|
|
score: 0
|
2026-01-16 19:10:21 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
id: 4,
|
2026-02-03 01:46:03 +08:00
|
|
|
|
title: '账户安全',
|
|
|
|
|
|
content: '为了账户安全,建议开启双重认证 (2FA)。定期修改密码也是好习惯。',
|
|
|
|
|
|
score: 0
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
])
|
|
|
|
|
|
|
2026-02-03 01:46:03 +08:00
|
|
|
|
const retrievedDocs = computed(() => {
|
|
|
|
|
|
return documents.value
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.filter(doc => doc.score > 0.6)
|
2026-02-03 01:46:03 +08:00
|
|
|
|
.sort((a, b) => b.score - a.score)
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
const calculateSimilarity = (q, docContent) => {
|
|
|
|
|
|
// Simple keyword matching simulation
|
|
|
|
|
|
if (q.includes('密码') && (docContent.includes('密码') || docContent.includes('安全'))) return 0.95
|
|
|
|
|
|
if (q.includes('价格') && docContent.includes('价')) return 0.9
|
|
|
|
|
|
if (q.includes('API') && docContent.includes('API')) return 0.9
|
|
|
|
|
|
|
|
|
|
|
|
// Random noise for non-matches
|
2026-02-03 01:46:03 +08:00
|
|
|
|
return Math.random() * 0.3
|
|
|
|
|
|
}
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
|
|
|
|
|
const search = async () => {
|
2026-02-03 01:46:03 +08:00
|
|
|
|
if (isSearching.value || !query.value) return
|
|
|
|
|
|
|
2026-01-16 19:10:21 +08:00
|
|
|
|
isSearching.value = true
|
|
|
|
|
|
lastQuery.value = query.value
|
2026-02-03 01:46:03 +08:00
|
|
|
|
currentStep.value = 1
|
|
|
|
|
|
|
|
|
|
|
|
// Reset scores
|
|
|
|
|
|
documents.value.forEach(d => d.score = 0)
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
// Step 1: Simulate Scanning (1.5s)
|
|
|
|
|
|
await new Promise(r => setTimeout(r, 600))
|
|
|
|
|
|
|
|
|
|
|
|
// Calculate scores
|
2026-02-03 01:46:03 +08:00
|
|
|
|
documents.value.forEach(doc => {
|
2026-02-03 19:41:14 +08:00
|
|
|
|
doc.score = calculateSimilarity(query.value, doc.content + doc.title)
|
2026-02-03 01:46:03 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
await new Promise(r => setTimeout(r, 800)) // Wait for scan animation to finish visual impact
|
|
|
|
|
|
|
|
|
|
|
|
currentStep.value = 2 // Transition to retrieval
|
|
|
|
|
|
|
|
|
|
|
|
// Step 2: Assemble Context (1s)
|
|
|
|
|
|
await new Promise(r => setTimeout(r, 1000))
|
|
|
|
|
|
currentStep.value = 3 // Done
|
|
|
|
|
|
|
2026-02-03 01:46:03 +08:00
|
|
|
|
isSearching.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
2026-02-03 01:46:03 +08:00
|
|
|
|
<template>
|
2026-02-03 19:41:14 +08:00
|
|
|
|
<div class="rag-demo">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step 1: User Input -->
|
|
|
|
|
|
<div class="step-section input-section">
|
|
|
|
|
|
<div class="step-label">
|
|
|
|
|
|
<span class="step-num">1</span>
|
|
|
|
|
|
<span class="step-text">用户提问 (User Query)</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="search-box">
|
2026-02-03 01:46:03 +08:00
|
|
|
|
<input
|
|
|
|
|
|
v-model="query"
|
|
|
|
|
|
type="text"
|
2026-02-03 19:41:14 +08:00
|
|
|
|
placeholder="输入问题..."
|
2026-02-03 01:46:03 +08:00
|
|
|
|
@keyup.enter="search"
|
|
|
|
|
|
:disabled="isSearching"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<button
|
2026-02-03 19:41:14 +08:00
|
|
|
|
class="action-btn"
|
2026-02-03 01:46:03 +08:00
|
|
|
|
@click="search"
|
|
|
|
|
|
:disabled="isSearching || !query"
|
|
|
|
|
|
>
|
2026-02-03 19:41:14 +08:00
|
|
|
|
{{ isSearching ? '检索中...' : '🚀 开始检索' }}
|
2026-02-03 01:46:03 +08:00
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
<!-- Arrow Connection -->
|
|
|
|
|
|
<div class="flow-arrow" :class="{ active: currentStep >= 1 }">
|
|
|
|
|
|
<div class="line"></div>
|
|
|
|
|
|
<div class="icon">🔍</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Step 2: Library Scanning -->
|
|
|
|
|
|
<div class="step-section library-section" :class="{ 'is-scanning': currentStep === 1 }">
|
|
|
|
|
|
<div class="step-label">
|
|
|
|
|
|
<span class="step-num">2</span>
|
|
|
|
|
|
<span class="step-text">图书馆检索 (Retrieval)</span>
|
|
|
|
|
|
<span class="status-badge" v-if="currentStep === 1">正在扫描...</span>
|
|
|
|
|
|
<span class="status-badge success" v-if="currentStep >= 2">命中 {{ retrievedDocs.length }} 条</span>
|
|
|
|
|
|
</div>
|
2026-02-03 01:46:03 +08:00
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
<div class="docs-grid">
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-for="doc in documents"
|
|
|
|
|
|
:key="doc.id"
|
|
|
|
|
|
class="doc-card"
|
|
|
|
|
|
:class="{
|
|
|
|
|
|
'matched': doc.score > 0.6 && currentStep >= 2,
|
|
|
|
|
|
'ignored': doc.score <= 0.6 && currentStep >= 2
|
|
|
|
|
|
}"
|
|
|
|
|
|
>
|
|
|
|
|
|
<div class="doc-header">
|
|
|
|
|
|
<span class="doc-icon">📄</span>
|
|
|
|
|
|
<span class="doc-title">{{ doc.title }}</span>
|
|
|
|
|
|
<span class="doc-score" v-if="currentStep >= 2 && doc.score > 0.6">
|
|
|
|
|
|
{{ (doc.score * 100).toFixed(0) }}% 相关
|
|
|
|
|
|
</span>
|
2026-02-03 01:46:03 +08:00
|
|
|
|
</div>
|
2026-02-03 19:41:14 +08:00
|
|
|
|
<div class="doc-content">{{ doc.content }}</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Visual effect for scanning -->
|
|
|
|
|
|
<div class="scan-line" v-if="currentStep === 1"></div>
|
2026-02-03 01:46:03 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-02-03 19:41:14 +08:00
|
|
|
|
</div>
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
<!-- Arrow Connection -->
|
|
|
|
|
|
<div class="flow-arrow" :class="{ active: currentStep >= 2 }">
|
|
|
|
|
|
<div class="line"></div>
|
|
|
|
|
|
<div class="icon">✂️ 复制粘贴</div>
|
|
|
|
|
|
</div>
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
<!-- Step 3: Context Assembly -->
|
|
|
|
|
|
<div class="step-section context-section" :class="{ active: currentStep >= 3 }">
|
|
|
|
|
|
<div class="step-label">
|
|
|
|
|
|
<span class="step-num">3</span>
|
|
|
|
|
|
<span class="step-text">最终上下文 (Final Prompt)</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="blackboard">
|
|
|
|
|
|
<div class="chalk-text system">
|
|
|
|
|
|
<span class="role-badge">SYSTEM</span>
|
|
|
|
|
|
你是一个专业的 AI 助手。请基于下方【检索到的资料】回答用户的提问。
|
2026-02-03 01:46:03 +08:00
|
|
|
|
</div>
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
<div class="retrieved-block" v-if="currentStep >= 2">
|
|
|
|
|
|
<div class="block-header">📚 检索到的资料 (Context)</div>
|
|
|
|
|
|
<div v-if="retrievedDocs.length > 0">
|
|
|
|
|
|
<div v-for="doc in retrievedDocs" :key="doc.id" class="retrieved-item">
|
|
|
|
|
|
{{ doc.content }}
|
|
|
|
|
|
</div>
|
2026-02-03 01:46:03 +08:00
|
|
|
|
</div>
|
2026-02-03 19:41:14 +08:00
|
|
|
|
<div v-else class="empty-state">
|
|
|
|
|
|
(未找到相关资料)
|
2026-02-03 01:46:03 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
<div class="chalk-text user">
|
|
|
|
|
|
<span class="role-badge">USER</span>
|
|
|
|
|
|
{{ lastQuery || '等待提问...' }}
|
|
|
|
|
|
</div>
|
2026-02-03 01:46:03 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
2026-01-16 19:10:21 +08:00
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.rag-demo {
|
2026-02-03 01:46:03 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
gap: 0;
|
|
|
|
|
|
background: var(--vp-c-bg-soft);
|
|
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
padding: 1.5rem;
|
|
|
|
|
|
max-width: 600px;
|
|
|
|
|
|
margin: 1rem auto;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.step-section {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
background: var(--vp-c-bg);
|
|
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
2026-02-14 20:23:34 +08:00
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
padding: 0.75rem;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.step-label {
|
2026-01-16 19:10:21 +08:00
|
|
|
|
display: flex;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
align-items: center;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
|
margin-bottom: 0.8rem;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
font-size: 0.95rem;
|
|
|
|
|
|
color: var(--vp-c-text-1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.step-num {
|
|
|
|
|
|
background: var(--vp-c-brand);
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
width: 20px;
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
|
font-weight: bold;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
/* Input Section */
|
|
|
|
|
|
.search-box {
|
2026-02-03 01:46:03 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
input {
|
2026-01-16 19:10:21 +08:00
|
|
|
|
flex: 1;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
padding: 0.6rem;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
2026-02-03 01:46:03 +08:00
|
|
|
|
border-radius: 6px;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
background: var(--vp-c-bg-alt);
|
|
|
|
|
|
font-size: 0.9rem;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.action-btn {
|
|
|
|
|
|
background: var(--vp-c-brand);
|
2026-02-03 01:46:03 +08:00
|
|
|
|
color: white;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
padding: 0.5rem 1rem;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
font-weight: 500;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
transition: opacity 0.2s;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.action-btn:disabled {
|
2026-02-03 01:46:03 +08:00
|
|
|
|
opacity: 0.6;
|
|
|
|
|
|
cursor: not-allowed;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
/* Library Section */
|
|
|
|
|
|
.docs-grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
|
|
|
|
gap: 0.8rem;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.doc-card {
|
2026-02-03 19:41:14 +08:00
|
|
|
|
background: var(--vp-c-bg-alt);
|
2026-01-16 19:10:21 +08:00
|
|
|
|
border: 1px solid var(--vp-c-divider);
|
2026-02-03 01:46:03 +08:00
|
|
|
|
border-radius: 6px;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
padding: 0.6rem;
|
|
|
|
|
|
font-size: 0.8rem;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
position: relative;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
transition: all 0.3s ease;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 01:46:03 +08:00
|
|
|
|
.doc-card.matched {
|
2026-02-03 19:41:14 +08:00
|
|
|
|
border-color: var(--vp-c-brand);
|
|
|
|
|
|
background: var(--vp-c-brand-dimm);
|
|
|
|
|
|
transform: scale(1.02);
|
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.doc-card.ignored {
|
|
|
|
|
|
opacity: 0.4;
|
|
|
|
|
|
filter: grayscale(0.8);
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
.doc-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 0.4rem;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
2026-02-03 01:46:03 +08:00
|
|
|
|
.doc-score {
|
|
|
|
|
|
color: var(--vp-c-brand);
|
2026-02-03 19:41:14 +08:00
|
|
|
|
font-size: 0.75rem;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.doc-content {
|
|
|
|
|
|
color: var(--vp-c-text-2);
|
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
|
-webkit-line-clamp: 2;
|
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
|
overflow: hidden;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
/* Scanning Animation */
|
|
|
|
|
|
.scan-line {
|
2026-02-03 01:46:03 +08:00
|
|
|
|
position: absolute;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
top: 0;
|
|
|
|
|
|
left: -100%;
|
|
|
|
|
|
width: 50%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
|
|
|
|
|
|
animation: scan 1s infinite;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes scan {
|
|
|
|
|
|
0% { left: -100%; }
|
|
|
|
|
|
100% { left: 200%; }
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
/* Context Section */
|
|
|
|
|
|
.blackboard {
|
|
|
|
|
|
background: #2b2b2b;
|
|
|
|
|
|
color: #e0e0e0;
|
2026-02-14 20:23:34 +08:00
|
|
|
|
padding: 0.75rem;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
font-size: 0.85rem;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
border: 2px solid #444;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.role-badge {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
background: #444;
|
|
|
|
|
|
color: #aaa;
|
|
|
|
|
|
padding: 1px 4px;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
|
margin-right: 6px;
|
|
|
|
|
|
vertical-align: middle;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
.chalk-text {
|
|
|
|
|
|
margin-bottom: 0.8rem;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
.retrieved-block {
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.1);
|
|
|
|
|
|
border-left: 3px solid var(--vp-c-brand);
|
|
|
|
|
|
padding: 0.6rem;
|
|
|
|
|
|
margin: 0.5rem 0 1rem 0;
|
|
|
|
|
|
animation: slideIn 0.5s ease-out;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
@keyframes slideIn {
|
|
|
|
|
|
from { opacity: 0; transform: translateY(-10px); }
|
|
|
|
|
|
to { opacity: 1; transform: translateY(0); }
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.block-header {
|
|
|
|
|
|
color: var(--vp-c-brand);
|
2026-01-16 19:10:21 +08:00
|
|
|
|
font-weight: bold;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
font-size: 0.75rem;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
margin-bottom: 0.4rem;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
text-transform: uppercase;
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
2026-01-16 19:10:21 +08:00
|
|
|
|
.retrieved-item {
|
2026-02-03 19:41:14 +08:00
|
|
|
|
margin-bottom: 0.4rem;
|
|
|
|
|
|
padding-left: 0.8rem;
|
|
|
|
|
|
position: relative;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.retrieved-item::before {
|
|
|
|
|
|
content: "•";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
color: #888;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
/* Arrows */
|
|
|
|
|
|
.flow-arrow {
|
2026-02-03 01:46:03 +08:00
|
|
|
|
display: flex;
|
2026-02-03 19:41:14 +08:00
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
height: 40px;
|
|
|
|
|
|
color: var(--vp-c-divider);
|
|
|
|
|
|
position: relative;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
.flow-arrow .line {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
width: 2px;
|
|
|
|
|
|
background: var(--vp-c-divider);
|
|
|
|
|
|
z-index: 0;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
|
|
|
|
|
|
.flow-arrow .icon {
|
|
|
|
|
|
background: var(--vp-c-bg-soft);
|
|
|
|
|
|
padding: 4px;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
font-size: 1.2rem;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.flow-arrow.active .line {
|
|
|
|
|
|
background: var(--vp-c-brand);
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.flow-arrow.active .icon {
|
|
|
|
|
|
animation: bounce 1s infinite;
|
2026-02-03 01:46:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 19:41:14 +08:00
|
|
|
|
.status-badge {
|
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
background: var(--vp-c-bg-soft);
|
|
|
|
|
|
color: var(--vp-c-text-2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-badge.success {
|
|
|
|
|
|
background: rgba(16, 185, 129, 0.1);
|
|
|
|
|
|
color: #10b981;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes bounce {
|
|
|
|
|
|
0%, 100% { transform: translateY(0); }
|
|
|
|
|
|
50% { transform: translateY(3px); }
|
2026-01-16 19:10:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|