Giter Site home page Giter Site logo

Comments (7)

Issues-translate-bot avatar Issues-translate-bot commented on May 11, 2024

Bot detected the issue body's language is not English, translate it automatically.


Title: ✨ [Feature]: How to add custom components and blocks?

from tiny-engine.

wenmine avatar wenmine commented on May 11, 2024

@Manson596 您好,当前使用bundle.json的形式支持的是我们引入第三方组件,而我们自定义区块在tinyengine中因为依赖构建和发布,以及相对应的api。这部分内容需要等到12月份后端开源后,将tiny-engine前后端进行配套后,才能真正的开放。

from tiny-engine.

Issues-translate-bot avatar Issues-translate-bot commented on May 11, 2024

Bot detected the issue body's language is not English, translate it automatically.


@Manson596 Hello, the current use of bundle.json supports the introduction of third-party components, and our custom blocks depend on building and publishing in tinyengine, as well as the corresponding API. This part of the content needs to wait until the back-end is open sourced in December and the tiny-engine front-end and back-end are matched before it can be truly open.

from tiny-engine.

Manson596 avatar Manson596 commented on May 11, 2024

目前我仿造内置img组件在packages/canvas/src/components/builtin.json等文件添加了自定义组件 设计器中显示正常,但是预览的时候看到接口schemas2code只返回了我自定义的组件名称,并没有返回template结构

from tiny-engine.

Issues-translate-bot avatar Issues-translate-bot commented on May 11, 2024

Bot detected the issue body's language is not English, translate it automatically.


Currently, I imitate the built-in img component and add a custom component designer to files such as packages/canvas/src/components/builtin.json, which displays normally in the designer. However, when previewing, I see that the interface schemas2code only returns my customized component name, and No template structure is returned

from tiny-engine.

yaoyun8 avatar yaoyun8 commented on May 11, 2024

@Manson596 内置组件在画布中正常渲染是简单的组件引用,预览经DSL出码时对这些组件做了转换处理,如Text组件转换为span标签(见vue-generator下的text2Span函数)。
如要添加自定义组件,可参考Text组件转换方式在DSL中进行特殊处理。

from tiny-engine.

Issues-translate-bot avatar Issues-translate-bot commented on May 11, 2024

Bot detected the issue body's language is not English, translate it automatically.


@Manson596 The normal rendering of built-in components in the canvas is a simple component reference. When the preview is output by DSL, these components are converted. For example, the Text component is converted into a span tag (see the text2Span function under vue-generator).
If you want to add a custom component, you can refer to the Text component conversion method for special processing in DSL.

from tiny-engine.

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.