UNPKG

form-tdesigner

Version:

好用的Vue低代码可视化表单设计器,可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率。

49 lines (46 loc) 946 B
import uniqueId from '@form-create/utils/lib/unique'; import { localeProps, makeOptionsRule, makeTreeOptions, } from '../../utils/index'; const label = '多选框组'; const name = 'checkbox'; export default { menu: 'main', icon: 'icon-checkbox', label, name, event: ['change'], validate: ['array'], rule({ t }) { return { type: name, field: uniqueId(), title: t('com.checkbox.name'), info: '', effect: { fetch: '', }, $required: false, props: {}, value: [''], options: makeTreeOptions( t('props.option'), { label: 'label', value: 'value' }, 1, ), }; }, props(_, { t }) { return localeProps(t, name + '.props', [ makeOptionsRule(t, 'options'), ...[ { type: 'switch', field: 'disabled', }, ], ]); }, };