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

[Feature]: 使用文档能否补充原生JS的写法 #1873

Open
Ean-Yan opened this issue Sep 14, 2024 · 2 comments
Open

[Feature]: 使用文档能否补充原生JS的写法 #1873

Ean-Yan opened this issue Sep 14, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation new feature

Comments

@Ean-Yan
Copy link

Ean-Yan commented Sep 14, 2024

背景&目的

背景

在整合至一些其它前端框架时,需要直接使用JavaScript作为编辑语言,但官方文档内仅有TypeScript的代码示例。

示例1

官方文档内通过 import LogicFlow from '@logicflow/core'; 引入后,可以直接使用const lf = new LogicFlow()创建实例,而在JavaScript中需要使用Core.default()来构造,在文档中没有找到相关说明。

示例2

类似的,在自定义Node节点继承类时,在JavaScript中需要使用 class TaskRectNode extends Core.RectNode {};

@ChangeSuger ChangeSuger added the documentation Improvements or additions to documentation label Sep 16, 2024
@yangyjxm
Copy link

+1

@boyongjiong
Copy link
Collaborator

你是指直接通过 CDN 引入 js 资源时的使用方法,这块儿是有一些问题。你们想在项目中还是直接通过 script 的方式引入的资源吗?

我们会考虑优化一下这个的体验,争取跟 TS 开发体验无差别

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation new feature
Projects
None yet
Development

No branches or pull requests

4 participants