Skip to content

表单里的行内field和区块的换行operation实现优化 #73

@w3cmark

Description

@w3cmark

目前表单的field都是行块布局,遇到需要行内展示时如何实现?

而operations都是行内布局,遇到需要换行展示时如何实现?

目前配置:

const config = {
    type: 'list',
    resource: {
        fields: {
            text: {
                label: '文本1',
                type: 'text',
                props: {
                    inline: true
                }
            },
            text2: {
                label: '文本2',
                type: 'text',
                props: {
                    inline: true
                }
            },
            date1: {
                type: 'date',
                label: '日期1'
            },
            date2: { // 如果date1和date2想在同一行,而text2和date1不在同一行是实现不了的
                type: 'date',
                label: '日期2',
                props: {
                    inline: true
                }
            }
        }  
    },
    operations: {
        testText: {
            slot: 'searchs',
            type: 'field',
            field: 'testText',
            label: '文本'
        },
        testSelect: {
            slot: 'searchs',
            type: 'field',
            props: {
                inline: false // 利用了浮动来实现,会有副作用
            }
        }
    }
}

element的行内表单是针对整个表单,无法针对某一个表单项。

优化方案:

暂无。

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