Giter VIP home page Giter VIP logo

Comments (12)

asheng1219 avatar asheng1219 commented on June 12, 2024

解决掉了 需要编译下es6的语法

from jsmind.

hizzgdev avatar hizzgdev commented on June 12, 2024
import jsMind from 'jsmind'
import 'jsmind/draggable-node'
import 'jsmind/style/jsmind.css'

可以参考这个示例
https://github.com/hizzgdev/jsmind-samples/tree/main/jsmind-vue

from jsmind.

asheng1219 avatar asheng1219 commented on June 12, 2024

import 'jsmind/draggable-node'
这种方式引入的会报错找不到路径
import 'jsmind/es6/jsmind.draggable-node.js';
完整的引入才可以
现在又遇到一个问题
import domtoimage from 'dom-to-image';
import 'jsmind/es6/jsmind.screenshot.js';
引入screenshot的时候 我已经安装了dom-to-image并且引入了还是会报错
Error: dom-to-image is required

from jsmind.

hizzgdev avatar hizzgdev commented on June 12, 2024

https://github.com/hizzgdev/jsmind/blob/master/docs/zh/plugin-screenshot.md

我不确定为什么你那里会报找不到路径,但是直接引用 js 文件可能确实不是很方便,这样的话相当于在你的项目里要把 jsMind 重新 build 一遍,如果真要这么做的话,你可以参考 jsmind 的 package.json 里怎么 build 的,在你的项目里同样处理应该就好了。

from jsmind.

asheng1219 avatar asheng1219 commented on June 12, 2024

因为我的项目需要再无网络状态下运行 没有办法使用csdn 但是我按照您的官方文档去操作确实出现了这种错误找不到路径的错误 我的项目node.js是10.22.0,使用的是vue2 ,可能是项目比较老吧 不过还是感谢作者大大您的回答

from jsmind.

JinHaocong avatar JinHaocong commented on June 12, 2024

我在vue2项目中使用时报了这个错 You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. 请问怎么解决?

from jsmind.

hizzgdev avatar hizzgdev commented on June 12, 2024

抱歉 @JinHaocong 我本人也并非太了解 vue,以后有时间我会尝试也在 vue2 的环境里试一下。但在此之前,恐怕还需要你自己多尝试尝试,如果发现需要修改 jsMind 才能解决的话,麻烦也告诉我一声,我可以在下个版本里把这个补丁给打上。非常感谢!

from jsmind.

JinHaocong avatar JinHaocong commented on June 12, 2024

from jsmind.

JinHaocong avatar JinHaocong commented on June 12, 2024

抱歉 @JinHaocong 我本人也并非太了解 vue,以后有时间我会尝试也在 vue2 的环境里试一下。但在此之前,恐怕还需要你自己多尝试尝试,如果发现需要修改 jsMind 才能解决的话,麻烦也告诉我一声,我可以在下个版本里把这个补丁给打上。非常感谢!

只需要降级一下es6语法即可

from jsmind.

JerryWangTdcy avatar JerryWangTdcy commented on June 12, 2024

抱歉 @JinHaocong 我本人也并非太了解 vue,以后有时间我会尝试也在 vue2 的环境里试一下。但在此之前,恐怕还需要你自己多尝试尝试,如果发现需要修改 jsMind 才能解决的话,麻烦也告诉我一声,我可以在下个版本里把这个补丁给打上。非常感谢!

只需要降级一下es6语法即可

您好,能说一下具体如何操作的吗?

from jsmind.

JinHaocong avatar JinHaocong commented on June 12, 2024

抱歉 @JinHaocong 我本人也并非太了解 vue,以后有时间我会尝试也在 vue2 的环境里试一下。但在此之前,恐怕还需要你自己多尝试尝试,如果发现需要修改 jsMind 才能解决的话,麻烦也告诉我一声,我可以在下个版本里把这个补丁给打上。非常感谢

我的项目是老版本的vue2项目,bable.config.js已经配置了'@vue/cli-plugin-babel/preset',但是还是报错需要额外的loader来处理jsmind,后来查阅资料发现,这个预设不会对node_modules中的包进行处理,如需要额外处理,需要在vue.config.js中添加modules.exports = {
transpileDependencies: ['jsmind'],
}
这样就可以了

from jsmind.

JinHaocong avatar JinHaocong commented on June 12, 2024

抱歉 @JinHaocong 我本人也并非太了解 vue,以后有时间我会尝试也在 vue2 的环境里试一下。但在此之前,恐怕还需要你自己多尝试尝试,如果发现需要修改 jsMind 才能解决的话,麻烦也告诉我一声,我可以在下个版本里把这个补丁给打上。非常感谢!

只需要降级一下es6语法即可

您好,能说一下具体如何操作的吗?

vue-cli官方文档是这样说的
image

from jsmind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.