Skip to content

配置属性的命名统一为横杠的格式 #71

@w3cmark

Description

@w3cmark

针对ams自定义的配置属性,到底是用驼峰还是横杠?

比如resource里的fields在配置label宽度配置和block-form的label宽度配置不一致

目前配置:

const config = {
    type: 'form',
    resource: {
        fields: {
            switchFieldB: {
                labelWidth: '0'
            }
        }
    },
    props: {
        'label-width': '0'
    }
}

解决方案:

建议和element保持一致,统一用横杠

const config = {
    type: 'form',
    resource: {
        fields: {
            switchFieldB: {
                attrs: {
                    'label-width': '0'
                }
            }
        }
    },
    attrs: {
        'label-width': '0'
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions