no message
This commit is contained in:
parent
746977c80e
commit
d2da217006
1615
simple-mind-map/pnpm-lock.yaml
generated
Normal file
1615
simple-mind-map/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,14 @@
|
||||
<template>
|
||||
<div class="home min-h-screen bg-gradient-to-br from-gray-50 to-gray-100 p-6">
|
||||
<h1 class="title text-3xl font-bold text-center text-gray-800 mb-8">思维导图演示</h1>
|
||||
<div class="mind-map-container bg-white rounded-lg shadow-lg p-4 h-[80vh]">
|
||||
<div class="h-screen bg-gradient-to-br from-gray-50 to-gray-100 p-6">
|
||||
<MindMap />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
// 使用正确的包名导入
|
||||
import { MindMap } from '@mind-map/component';
|
||||
import { onMounted } from "vue";
|
||||
import { MindMap } from "@mind-map/component";
|
||||
|
||||
onMounted(() => {
|
||||
console.log('Home view mounted');
|
||||
console.log("Home view mounted");
|
||||
});
|
||||
</script>
|
||||
10
web3/package.json
Normal file
10
web3/package.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"simple-mind-map": "link:../../../../Library/pnpm/global/5/node_modules/simple-mind-map"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"simple-mind-map": "link:../../../../Library/pnpm/global/5/node_modules/simple-mind-map"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
cd simple-mind-map
|
||||
pnpm i
|
||||
pnpm link
|
||||
cd ..
|
||||
cd web3
|
||||
cd packages/mind-map
|
||||
pnpm i
|
||||
pnpm link simple-mind-map
|
||||
@ -11,7 +11,14 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.3.4"
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "^8.27.2",
|
||||
"highlight.js": "^10.7.3",
|
||||
"katex": "^0.16.9",
|
||||
"simple-mind-map-plugin-themes": "^1.0.0",
|
||||
"@toast-ui/editor": "^3.1.5",
|
||||
"axios": "^1.7.9",
|
||||
"codemirror": "^5.65.16"
|
||||
},
|
||||
"main": "src/index.ts",
|
||||
"module": "src/index.ts",
|
||||
|
||||
@ -1,13 +1,66 @@
|
||||
<template>
|
||||
<div class="mind-map bg-white rounded-lg shadow-md p-4 w-full h-64">
|
||||
<!-- 这是一个最小化的思维导图实现,只包含一个简单的div -->
|
||||
<div class="flex items-center justify-center h-full text-gray-500">
|
||||
Mind Map Component
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="mindMapContainer w-full h-full border border-red"
|
||||
id="mindMapContainer"
|
||||
ref="mindMapContainer"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
// 组件逻辑可以在这里添加
|
||||
</script>
|
||||
import MindMap from "simple-mind-map";
|
||||
import MiniMap from "simple-mind-map/src/plugins/MiniMap.js";
|
||||
import Watermark from "simple-mind-map/src/plugins/Watermark.js";
|
||||
import KeyboardNavigation from "simple-mind-map/src/plugins/KeyboardNavigation.js";
|
||||
import ExportPDF from "simple-mind-map/src/plugins/ExportPDF.js";
|
||||
import ExportXMind from "simple-mind-map/src/plugins/ExportXMind.js";
|
||||
import Export from "simple-mind-map/src/plugins/Export.js";
|
||||
import Drag from "simple-mind-map/src/plugins/Drag.js";
|
||||
import Select from "simple-mind-map/src/plugins/Select.js";
|
||||
import RichText from "simple-mind-map/src/plugins/RichText.js";
|
||||
import AssociativeLine from "simple-mind-map/src/plugins/AssociativeLine.js";
|
||||
import TouchEvent from "simple-mind-map/src/plugins/TouchEvent.js";
|
||||
import NodeImgAdjust from "simple-mind-map/src/plugins/NodeImgAdjust.js";
|
||||
import SearchPlugin from "simple-mind-map/src/plugins/Search.js";
|
||||
import Painter from "simple-mind-map/src/plugins/Painter.js";
|
||||
import ScrollbarPlugin from "simple-mind-map/src/plugins/Scrollbar.js";
|
||||
import Formula from "simple-mind-map/src/plugins/Formula.js";
|
||||
import RainbowLines from "simple-mind-map/src/plugins/RainbowLines.js";
|
||||
import Demonstrate from "simple-mind-map/src/plugins/Demonstrate.js";
|
||||
import OuterFrame from "simple-mind-map/src/plugins/OuterFrame.js";
|
||||
import MindMapLayoutPro from "simple-mind-map/src/plugins/MindMapLayoutPro.js";
|
||||
import NodeBase64ImageStorage from "simple-mind-map/src/plugins/NodeBase64ImageStorage.js";
|
||||
import Themes from "simple-mind-map-plugin-themes";
|
||||
|
||||
import { onMounted, Ref, ref } from "vue";
|
||||
|
||||
const mindMap: Ref<any> = ref(null);
|
||||
const mindMapContainer = ref(null);
|
||||
|
||||
function initMindMap() {
|
||||
if (!mindMapContainer.value) return;
|
||||
|
||||
mindMap.value = new MindMap({
|
||||
el: mindMapContainer.value,
|
||||
data: [],
|
||||
fit: false,
|
||||
// layout: layout,
|
||||
// theme: theme.template,
|
||||
// themeConfig: theme.config,
|
||||
// viewData: view,
|
||||
nodeTextEditZIndex: 1000,
|
||||
nodeNoteTooltipZIndex: 1000,
|
||||
customNoteContentShow: {
|
||||
show: (content, left, top, node) => {
|
||||
//
|
||||
},
|
||||
hide: () => {
|
||||
// this.$bus.$emit('hideNoteContent')
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
initMindMap();
|
||||
});
|
||||
</script>
|
||||
|
||||
573
web3/pnpm-lock.yaml
generated
573
web3/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user