Replies: 2 comments
-
@kkWork00 你好,面对粘贴大段代码其实很难能帮你调试,不如你做一个最简单的页面,单独验证这个问题可能更容易分析一些。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
好的,谢谢您的回复
…---原始邮件---
发件人: "Zhigang ***@***.***>
发送时间: 2025年3月10日(周一) 下午5:23
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [hizzgdev/jsmind] 您好,我在react上集成jsmind的时候,选择了一个节点,然后点击添加节点的时候,提示未选择节点,我跟踪分析了下,在_event_bind的回调也没有被调用,辛苦帮忙看下 (Discussion #640)
@kkWork00 你好,面对粘贴大段代码其实很难能帮你调试,不如你做一个最简单的页面,单独验证这个问题可能更容易分析一些。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
import React, { useEffect, useRef, useState } from 'react';
import 'jsmind/style/jsmind.css'; // 引入 jsMind 的样式
import jsMind from 'jsmind'; // 默认导入
// import 'jsmind/draggable-node'
// import 'jsmind/screenshot'
// import 'jsmind/es6/jsmind.draggable-node.js';
// import 'jsmind/es6/jsmind.screenshot.js';
// import screenshot from 'jsmind/es6/jsmind.screenshot.js';
// import draggable-node from 'jsmind/es6/jsmind.draggable-node.js';
// 定义思维导图数据
const mindData = {
meta: {
name: 'jsMind-demo-tree',
author: 'hizzgdev@163.com',
version: '0.2'
},
format: 'node_tree',
data: {
id: 'root',
topic: 'jsMind',
children: [
{
id: 'easy',
topic: 'Easy',
direction: 'left',
expanded: false,
children: [
{ id: 'easy1', topic: 'Easy to show' },
{ id: 'easy2', topic: 'Easy to edit' },
{ id: 'easy3', topic: 'Easy to store' },
{ id: 'easy4', topic: 'Easy to embed' }
]
},
{
id: 'open',
topic: 'Open Source',
direction: 'right',
expanded: true,
children: [
{ id: 'open1', topic: 'on GitHub' },
{ id: 'open2', topic: 'BSD License' }
]
},
{
id: 'powerful',
topic: 'Powerful',
direction: 'right',
children: [
{ id: 'powerful1', topic: 'Base on Javascript' },
{ id: 'powerful2', topic: 'Base on HTML5' },
{ id: 'powerful3', topic: 'Depends on you' }
]
},
{
id: 'other',
topic: 'test node',
direction: 'left',
children: [
{ id: 'other1', topic: "I'm from local variable" },
{ id: 'other2', topic: 'I can do everything' }
]
}
]
}
};
const MindMapView = ({ strategies, onDelete, onEdit, onSelectStrategy }) => {
const mindMapContainer = useRef(null);
const jmInstance = useRef(null);
const [selectedNode, setSelectedNode] = useState(null);
const [newNodeTopic, setNewNodeTopic] = useState('');
const [editNodeTopic, setEditNodeTopic] = useState('');
};
export default MindMapView;
Beta Was this translation helpful? Give feedback.
All reactions