Comments (7)
from tmagic-editor.
propsService.usePlugin({
/**
* result为生成好的默认配置
* config为组件中定义好的配置
*/
afterFillConfig(result, config) {
return config
}
});
from tmagic-editor.
可以看fillConfig的实现
就是要在afterFillConfig里重新实现上面这个函数
from tmagic-editor.
感谢大佬回复,再请教下:
目前我在看文档的教程:DSL解析那个章节的例子,遇到了个这样一个问题:在文档组件库开发那个章节中写了一个Test的组件,我使用这个组件时发现定义的formConfig和initValue没生效,下面是部分代码
在editor-runtime 中定义组件并且全局注册
textCard.vue
import textCard from './src/index.vue';
export { default as config } from './src/formConfig';
export { default as value } from './src/initValue';
export default textCard;
在hello-editor的App.vue中使用,componentGroupList
{
title: '基础组件',
items: [
{
icon: 'https://vfiles.gtimg.cn/vupload/20220614/9cc3091655207317835.png',
text: 'HelloWorld',
type: 'hello-world',
},
{
icon: 'https://vfiles.gtimg.cn/vupload/20220614/9cc3091655207317835.png',
text: '测试文本',
type: 'text-card',
},
],
},
编辑器查看config,发现只有一个text,定义组件时的value和config并未挂载到text-card中,请请教下大佬是啥原因呢,在哪里注入的value和config
from tmagic-editor.
需要配置propsconfigs 与 propsvalues
from tmagic-editor.
这一块,我也挺希望能有多一点的例子,文档有的时候看不懂😂
from tmagic-editor.
@spierBoy 能否给一个联系方式交流一下,因为我也有这个需求
from tmagic-editor.
Related Issues (20)
- packages/editor/src/services/editor.ts 文件中的update方法有bug,导致父子组件更新时调用doUpdate子组件获取到info.parent是旧数据 HOT 1
- 画布尺寸切换组件 DeviceGroup 失效
- 蒙层切换层级位置后删除,再选中其他蒙层无法展示
- form-editor组件拖进去不显示
- asyncLoadJs在并发加载两个js文件时会导致相对路径错误 HOT 1
- build会导致内存溢出
- 按照文档快速开始报错global is not defined HOT 1
- tmagic-admin怎么和tmagic-editor结合呢
- radio-group的使用方式发生改变了吗? HOT 1
- componentGroupList自定义icon HOT 1
- 组件内部通过api获取到某些数据,如何用这些数据去反向修改右侧编辑框中的数据呢? HOT 3
- xp系统 是否可以通过增加plugin 来兼容 HOT 3
- input组件无法及时更新数据。 HOT 2
- 给组设置border 会导致组下的组件 位置偏移 HOT 2
- 运行pnpm bootstrap报错
- 初始化项目遇到的几个问题 HOT 1
- 请问有tmagic-editor的数据源的使用方法说明文档吗? HOT 1
- 集成到自己的项目中页面一直加载不出来 HOT 4
- chrome91版本,调用 editorService.update() 会出错,是否可以在下个版本兼容一下 HOT 4
- 数据源 处理 报错path_1[1] HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmagic-editor.