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

项目工程说明,支持二开。 #10439

Open
6LWa6ZKx opened this issue Jun 14, 2024 · 1 comment
Open

项目工程说明,支持二开。 #10439

6LWa6ZKx opened this issue Jun 14, 2024 · 1 comment
Labels
doc optimizing document

Comments

@6LWa6ZKx
Copy link

各位老哥,是否有二开相关的文档?

本地开发运行npm start 后编辑器进入的是“packages/amis-editor/index.html” 实际跳转的路由却是“packages/amis-editor/examples/Editor.tsx”。

根据https://aisuda.bce.baidu.com/amis/zh-CN/docs/start/getting-started中的提示,let amisScoped = amis.embed( '#root', amisJSON, { // 这里是初始 props,一般不用传。 // locale: 'en-US' // props 中可以设置语言,默认是中文 }, // 下面是一些可选的外部控制函数 {}
这里的第四个参数对象是可以传入一个控制函数,我想自定义一个“beforeSave”应用于我在编辑器右上角新增的“保存”按钮。

我通过debugger发现‘packages/amis-editor/examples/Editor.tsx’似乎和‘amis.embed()’没有什么关系,我无法注入amiEnv和这些内容产生关联。

那位老兄可以指点一下这个二开逻辑吗?

Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@github-actions github-actions bot added the doc optimizing document label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc optimizing document
Projects
None yet
Development

No branches or pull requests

1 participant