|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>SmartAI</div>
|
|
<div>SmartAI</div>
|
|
|
- <div class="box">
|
|
|
|
|
|
|
+ <!-- <div class="box">
|
|
|
<MindMap
|
|
<MindMap
|
|
|
:content="test_mk_str"
|
|
:content="test_mk_str"
|
|
|
:box_style="box_style"
|
|
:box_style="box_style"
|
|
@@ -8,87 +8,87 @@
|
|
|
:progress="progress"
|
|
:progress="progress"
|
|
|
@extend="extend"
|
|
@extend="extend"
|
|
|
></MindMap>
|
|
></MindMap>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, onMounted } from 'vue';
|
|
import { ref, onMounted } from 'vue';
|
|
|
-import MindMap from '../components/MindMap.vue';
|
|
|
|
|
-// 系统第一页
|
|
|
|
|
|
|
+// import MindMap from '../components/MindMap.vue';
|
|
|
|
|
+// // 系统第一页
|
|
|
|
|
|
|
|
-const mindMap_content = ref();
|
|
|
|
|
-const test_mk_str = `
|
|
|
|
|
-# markmap
|
|
|
|
|
|
|
+// const mindMap_content = ref();
|
|
|
|
|
+// const test_mk_str = `
|
|
|
|
|
+// # markmap
|
|
|
|
|
|
|
|
-- beautiful
|
|
|
|
|
-- useful
|
|
|
|
|
-- easy
|
|
|
|
|
- - hard
|
|
|
|
|
- - code
|
|
|
|
|
-- interactive
|
|
|
|
|
- - age
|
|
|
|
|
- - name
|
|
|
|
|
- - job
|
|
|
|
|
- - shaa
|
|
|
|
|
- - hhe
|
|
|
|
|
- - nihao
|
|
|
|
|
- - jfksaj
|
|
|
|
|
- - zheg
|
|
|
|
|
-`;
|
|
|
|
|
-const test_mk_str_extend = `
|
|
|
|
|
-# markmap
|
|
|
|
|
|
|
+// - beautiful
|
|
|
|
|
+// - useful
|
|
|
|
|
+// - easy
|
|
|
|
|
+// - hard
|
|
|
|
|
+// - code
|
|
|
|
|
+// - interactive
|
|
|
|
|
+// - age
|
|
|
|
|
+// - name
|
|
|
|
|
+// - job
|
|
|
|
|
+// - shaa
|
|
|
|
|
+// - hhe
|
|
|
|
|
+// - nihao
|
|
|
|
|
+// - jfksaj
|
|
|
|
|
+// - zheg
|
|
|
|
|
+// `;
|
|
|
|
|
+// const test_mk_str_extend = `
|
|
|
|
|
+// # markmap
|
|
|
|
|
|
|
|
-- beautiful
|
|
|
|
|
-- useful
|
|
|
|
|
-- easy
|
|
|
|
|
- - hard
|
|
|
|
|
- - code
|
|
|
|
|
-- interactive
|
|
|
|
|
- - age
|
|
|
|
|
- - name
|
|
|
|
|
- - job
|
|
|
|
|
- - shaa
|
|
|
|
|
- - hhe
|
|
|
|
|
- - nihao
|
|
|
|
|
- - jfksaj
|
|
|
|
|
- - zheg
|
|
|
|
|
- - 张三
|
|
|
|
|
- - 李四
|
|
|
|
|
- - 王五
|
|
|
|
|
- - 赵六
|
|
|
|
|
- - 孙七
|
|
|
|
|
-`;
|
|
|
|
|
|
|
+// - beautiful
|
|
|
|
|
+// - useful
|
|
|
|
|
+// - easy
|
|
|
|
|
+// - hard
|
|
|
|
|
+// - code
|
|
|
|
|
+// - interactive
|
|
|
|
|
+// - age
|
|
|
|
|
+// - name
|
|
|
|
|
+// - job
|
|
|
|
|
+// - shaa
|
|
|
|
|
+// - hhe
|
|
|
|
|
+// - nihao
|
|
|
|
|
+// - jfksaj
|
|
|
|
|
+// - zheg
|
|
|
|
|
+// - 张三
|
|
|
|
|
+// - 李四
|
|
|
|
|
+// - 王五
|
|
|
|
|
+// - 赵六
|
|
|
|
|
+// - 孙七
|
|
|
|
|
+// `;
|
|
|
|
|
|
|
|
-const box_style = ref({
|
|
|
|
|
- width: '100%',
|
|
|
|
|
- height: '100%'
|
|
|
|
|
-});
|
|
|
|
|
-const svg_style = ref({
|
|
|
|
|
- width: '100%',
|
|
|
|
|
- height: '100%'
|
|
|
|
|
-});
|
|
|
|
|
-const progress = ref(0);
|
|
|
|
|
-const target_node = ref(null);
|
|
|
|
|
-const root_full = ref(null);
|
|
|
|
|
-let timer_progress = null;
|
|
|
|
|
|
|
+// const box_style = ref({
|
|
|
|
|
+// width: '100%',
|
|
|
|
|
+// height: '100%'
|
|
|
|
|
+// });
|
|
|
|
|
+// const svg_style = ref({
|
|
|
|
|
+// width: '100%',
|
|
|
|
|
+// height: '100%'
|
|
|
|
|
+// });
|
|
|
|
|
+// const progress = ref(0);
|
|
|
|
|
+// const target_node = ref(null);
|
|
|
|
|
+// const root_full = ref(null);
|
|
|
|
|
+// let timer_progress = null;
|
|
|
|
|
|
|
|
-const extend = (item) => {
|
|
|
|
|
- console.log(item);
|
|
|
|
|
- target_node.value = item.node;
|
|
|
|
|
- root_full.value = item.full;
|
|
|
|
|
- progress.value = 0;
|
|
|
|
|
- timer_progress = setInterval(() => {
|
|
|
|
|
- if (progress.value < 100) {
|
|
|
|
|
- progress.value += 1;
|
|
|
|
|
- }
|
|
|
|
|
- if (progress.value == 100) {
|
|
|
|
|
- mindMap_content.value = test_mk_str_extend;
|
|
|
|
|
- }
|
|
|
|
|
- }, 30);
|
|
|
|
|
-};
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
- mindMap_content.value = test_mk_str;
|
|
|
|
|
-});
|
|
|
|
|
|
|
+// const extend = (item) => {
|
|
|
|
|
+// console.log(item);
|
|
|
|
|
+// target_node.value = item.node;
|
|
|
|
|
+// root_full.value = item.full;
|
|
|
|
|
+// progress.value = 0;
|
|
|
|
|
+// timer_progress = setInterval(() => {
|
|
|
|
|
+// if (progress.value < 100) {
|
|
|
|
|
+// progress.value += 1;
|
|
|
|
|
+// }
|
|
|
|
|
+// if (progress.value == 100) {
|
|
|
|
|
+// mindMap_content.value = test_mk_str_extend;
|
|
|
|
|
+// }
|
|
|
|
|
+// }, 30);
|
|
|
|
|
+// };
|
|
|
|
|
+// onMounted(() => {
|
|
|
|
|
+// mindMap_content.value = test_mk_str;
|
|
|
|
|
+// });
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
.box {
|
|
.box {
|