-
Notifications
You must be signed in to change notification settings - Fork 677
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
请教下编辑器扩展-定制属性配置这块的问题 #564
Comments
propsService.usePlugin({
/**
* result为生成好的默认配置
* config为组件中定义好的配置
*/
afterFillConfig(result, config) {
return config
}
}); |
可以看fillConfig的实现
就是要在afterFillConfig里重新实现上面这个函数 |
感谢大佬回复,再请教下: 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 |
需要配置propsconfigs 与 propsvalues |
这一块,我也挺希望能有多一点的例子,文档有的时候看不懂😂 |
@spierBoy 能否给一个联系方式交流一下,因为我也有这个需求 |
我的需求是:点击特定的业务组件,编辑器中右侧属性配置栏增加一个特定的tab分页(不是目前的属性、样式、事件和高级四个)
看了下编辑器扩展这块的文档,没太看明白,不知道该怎么干预propsService.fillConfig来实现自定义,大佬有时间可否讲解下,配合实例更佳,非常感谢!
The text was updated successfully, but these errors were encountered: