UNPKG

form-tdesigner

Version:

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

50 lines (46 loc) 978 B
import uniqueId from '@form-create/utils/lib/unique'; import { localeProps } from '../../utils'; const label = '多行输入框'; const name = 'textarea'; export default { menu: 'main', icon: 'icon-textarea', label, name, event: ['blur', 'focus', 'change', 'input'], validate: ['string'], rule({ t }) { return { type: 't-textarea', field: uniqueId(), title: t('com.textarea.name'), info: '', $required: false, }; }, props(_, { t }) { return localeProps(t, name + '.props', [ { type: 'switch', field: 'disabled', }, { type: 'switch', field: 'readonly', }, { type: 'inputNumber', field: 'maxlength', props: { min: 0 }, }, { type: 'input', field: 'placeholder', }, { type: 'switch', field: 'autosize', }, ]); }, };