Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

思维导图没有正确显示 #1

Closed
nondevops opened this issue Nov 3, 2019 · 1 comment
Closed

思维导图没有正确显示 #1

nondevops opened this issue Nov 3, 2019 · 1 comment

Comments

@nondevops
Copy link

nondevops commented Nov 3, 2019

环境:
hexo3.9
next7

部署:
npm install hexo-simple-mindmap --save

现象:
插件安装成功,使用时未能展示思维导图的样式,控制台发现有报错
image

image

$(document).ready(function(){$(".mindmap").each(function(){MM_FUNCS.drawMindMap(this)})});var MM_FUNCS={li2jsonData:function(c){var a;var b=c.children("a:first");if(b.length!==0){a={"data":{"text":b.text(),"hyperlink":b.attr("href")}}}else{a={"data":{"text":c[0].childNodes[0].nodeValue.trim()}}}c.find("> ul > li").each(function(){if(!a.hasOwnProperty("children")){a.children=[]}a.children.push(MM_FUNCS.li2jsonData($(this)))});return a},drawMindMap:function(a){var d=$(a).find(">ul:first");var c={"root":{}};var b=new kityminder.Minder({renderTo:a});c.root=MM_FUNCS.li2jsonData(d.children("li:first"));b.importData("json",JSON.stringify(c));b.disable();b.execCommand("hand");$(d).hide()}};

image
image

@HunterXuan
Copy link
Owner

需要先引入 jquery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants