ams icon indicating copy to clipboard operation
ams copied to clipboard

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

Open w3cmark opened this issue 4 years ago • 0 comments

目前表单的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的行内表单是针对整个表单,无法针对某一个表单项。

优化方案:

暂无。

w3cmark avatar Dec 22 '19 15:12 w3cmark