form-create-designer
Version:
好用的Vue低代码可视化表单设计器,可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率。
51 lines (48 loc) • 1.2 kB
JavaScript
import {localeProps, localeOptions} from '../../utils';
const name = 'tableFormColumn';
export default {
icon: 'icon-cell',
name,
aide: true,
drag: true,
dragBtn: false,
mask: false,
style: false,
rule({t}) {
return {
type: name,
props: {
label: t('com.tableFormColumn.label'),
width: 'auto'
},
children: []
};
},
props(_, {t}) {
return localeProps(t, name + '.props', [
{
type: 'input',
field: 'label',
},
{
type: 'select', field: 'align',
options: localeOptions(t, [{label: 'left', value: 'left'}, {label: 'center', value: 'center'}, {
label: 'right',
value: 'right'
}])
},
{
type: 'switch',
field: 'required',
},
{
type: 'input',
field: 'width',
},
{
type: 'ColorInput',
field: 'color',
}
]);
}
};