2025-09-04 05:47:42 +00:00
|
|
|
<template>
|
|
|
|
|
<div id="app">
|
2025-09-10 05:02:45 +00:00
|
|
|
<!-- 测试模式切换按钮 -->
|
|
|
|
|
<div class="test-mode-toggle">
|
|
|
|
|
<button @click="toggleTestMode" class="test-btn">
|
|
|
|
|
{{ isTestMode ? '切换到思维导图' : '测试Markdown渲染' }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 测试模式 -->
|
|
|
|
|
<div v-if="isTestMode" class="test-mode">
|
|
|
|
|
<MarkdownTest />
|
|
|
|
|
</div>
|
2025-09-04 05:47:42 +00:00
|
|
|
|
2025-09-10 05:02:45 +00:00
|
|
|
<!-- 正常模式 -->
|
|
|
|
|
<div v-else>
|
|
|
|
|
<!-- AI侧边栏 -->
|
|
|
|
|
<AISidebar @start-realtime-generation="handleStartRealtimeGeneration" />
|
|
|
|
|
|
|
|
|
|
<!-- 主内容区域 -->
|
|
|
|
|
<div class="main-content">
|
|
|
|
|
<MindMap ref="mindMapRef" />
|
|
|
|
|
</div>
|
2025-09-04 05:47:42 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2025-09-08 10:20:48 +00:00
|
|
|
import { ref } from 'vue';
|
2025-09-04 05:47:42 +00:00
|
|
|
import MindMap from "./components/MindMap.vue";
|
|
|
|
|
import AISidebar from "./components/AISidebar.vue";
|
2025-09-10 05:02:45 +00:00
|
|
|
import MarkdownTest from "./components/MarkdownTest.vue";
|
2025-09-08 10:20:48 +00:00
|
|
|
|
|
|
|
|
const mindMapRef = ref(null);
|
2025-09-10 05:02:45 +00:00
|
|
|
const isTestMode = ref(false);
|
|
|
|
|
|
|
|
|
|
// 切换测试模式
|
|
|
|
|
const toggleTestMode = () => {
|
|
|
|
|
isTestMode.value = !isTestMode.value;
|
|
|
|
|
};
|
2025-09-08 10:20:48 +00:00
|
|
|
|
|
|
|
|
// 处理开始实时生成事件
|
|
|
|
|
const handleStartRealtimeGeneration = () => {
|
|
|
|
|
console.log('🎬 开始实时生成,切换到思维导图界面');
|
|
|
|
|
if (mindMapRef.value) {
|
|
|
|
|
mindMapRef.value.showMindMapPage();
|
|
|
|
|
}
|
|
|
|
|
};
|
2025-09-04 05:47:42 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
#app {
|
|
|
|
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.main-content {
|
|
|
|
|
flex: 1;
|
|
|
|
|
margin-left: 350px;
|
|
|
|
|
transition: margin-left 0.3s ease;
|
|
|
|
|
width: calc(100% - 350px);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
* {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Mind Elixir 全局样式 */
|
|
|
|
|
.mind-elixir {
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mind-elixir .map-container {
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
2025-09-10 05:02:45 +00:00
|
|
|
|
|
|
|
|
/* 测试模式样式 */
|
|
|
|
|
.test-mode-toggle {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 20px;
|
|
|
|
|
right: 20px;
|
|
|
|
|
z-index: 1000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.test-btn {
|
|
|
|
|
padding: 10px 20px;
|
|
|
|
|
background: #007bff;
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
|
|
|
|
|
transition: all 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.test-btn:hover {
|
|
|
|
|
background: #0056b3;
|
|
|
|
|
transform: translateY(-1px);
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.test-mode {
|
|
|
|
|
height: 100vh;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
2025-09-04 05:47:42 +00:00
|
|
|
</style>
|