UNPKG

form-tdesigner

Version:

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

37 lines (34 loc) 698 B
import uniqueId from '@form-create/utils/lib/unique'; import { localeProps } from '../../utils'; const label = '开关'; const name = 'switch'; export default { menu: 'main', icon: 'icon-switch', label, name, event: ['change'], rule({ t }) { return { type: name, field: uniqueId(), title: t('com.switch.name'), info: '', $required: false, props: {}, }; }, props(_, { t }) { return localeProps(t, name + '.props', [ { type: 'switch', field: 'disabled', }, { type: 'inputNumber', field: 'width', props: { min: 0 }, }, ]); }, };