jsmind 思维导出 vue 示例
在线文档:
https://hizzgdev.github.io/jsmind/docs/zh/get-started/
yarn add jsmind
List.vue:
<template>
<div>
<div id="jsmind_container" style="width: 800px; height: 500px"></div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import 'jsmind/style/jsmind.css'
import jsMind from 'jsmind'
const handleInit = () => {
var mind = {
meta: {
name: 'example',
author: 'hizzgdev',
version: '0.2'
},
format: 'node_tree',
data: {
id: 'root',
topic: 'jsMind',
children: [
{ id: 'sub1', topic: 'sub1' },
{ id: 'sub2', topic: 'sub2' }
]
}
}
var options = {
container: 'jsmind_container',
theme: 'primary',
editable: true
}
var jm = new jsMind(options)
jm.show(mind)
}
onMounted(() => {
handleInit()
})
</script>
env.d.ts:
/// <reference types="vite/client" />
declare module "*.vue" {
import type { DefineComponent } from "vue";
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>;
export default component;
}
declare module 'jsmind';
人工智能学习网站
原文地址:https://blog.csdn.net/xutongbao/article/details/143688743
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!