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

designer组件设置,组件设置值与显示不匹配 #136

Closed
masukyyy opened this issue May 16, 2024 · 2 comments
Closed

designer组件设置,组件设置值与显示不匹配 #136

masukyyy opened this issue May 16, 2024 · 2 comments

Comments

@masukyyy
Copy link

目前设计器对一些公共配置需要拓展,
目前只能通过采用修改源码的方式更改,
了解到pro版本已发布,
想问一下开源版是否会支持公共配置自定义拓展,或者会在PRO版本中开放的计划吗?

@xaboy
Copy link
Owner

xaboy commented May 16, 2024

vue3版本最新版本已经支持.通过在config中配置可以实现

//定义函数返回规则或者通过rule字段返回规则
type extendRule = ((arg: { t: t }) => Rule[]) | { rule: (arg: { t: t }) => Rule[], append?: boolean };


type Config = {
    //基础配置的渲染规则,可以覆盖默认规则.append为true时追加到默认规则后面
    baseRule?: extendRule;
    //验证配置的渲染规则,可以覆盖默认规则.append为true时追加到默认规则后面
    validateRule?: extendRule;
    //表单的渲染规则,可以覆盖默认规则.append为true时追加到默认规则后面
    formRule?: extendRule;
    //组件配置的渲染规则,可以覆盖默认规则.append为true时追加到默认规则后面
    componentRule?: {
        //id组件拖拽组件规则的id,rule为当前组件的生成规则
        [id: string]: (rule: Rule, arg: { t: t }) => Rule[] | {
            rule: (rule: Rule, arg: { t: t }) => Rule[],
            append?: boolean
        }
    };
...
}

@masukyyy
Copy link
Author

谢谢!
文档上没看到,
现在已经解决了!!!!!!!

@masukyyy masukyyy reopened this May 24, 2024
@masukyyy masukyyy changed the title 关于设计器组件基础配置的权限开放 designer组件设置,组件设置值与显示不匹配 May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants