Code Monkey home page Code Monkey logo

Comments (6)

jia000 avatar jia000 commented on June 7, 2024

config是通过propsconfigs,value是通过propsvalues配置的,只要把新增的config跟value放进这两个属性配置里就行

from tmagic-editor.

jacksion1234 avatar jacksion1234 commented on June 7, 2024

按照您说的,propsconfigs和propsvalues确实可以配置,右侧表单也可以显示,但是我上面说的"magic-ui-XXX"这种全局组件并不能与自定义的组件绑定,比如自定义组件类型为magiccube,我在tmagic-admin项目中全局注册了magic-ui-magiccube这个组件,点击左侧组件栏添加该组件,只会出现一个空白的框,并非是magic-ui-magiccube这个组件,是还需要什么嘛?

from tmagic-editor.

jia000 avatar jia000 commented on June 7, 2024

要在runtime tmagic.config中的packages配置上

from tmagic-editor.

jacksion1234 avatar jacksion1234 commented on June 7, 2024

嗯,这个我知道,但是目前每次都得在tmagic-editor这边调试好组件,然后打包runtime到正式项目里去,有的时候俩边环境也不一样,可能还得单独调一下,有点麻烦,所以想着能不能不动这个runtime,然后直接在正式项目中建组件就能够被编辑器识别。

from tmagic-editor.

jia000 avatar jia000 commented on June 7, 2024

你可以把magicApp放到window上,然后把组件单独打包,然后加载注册

// const components = await import(xxxxx)
Object.entries(components).forEach(([type, component]: [string, any]) => {
  magicApp.component(`magic-ui-${type}`, defineAsyncComponent(component));
});

from tmagic-editor.

jacksion1234 avatar jacksion1234 commented on June 7, 2024

好的,我回头试试,谢谢答复。

from tmagic-editor.

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.