UNPKG

form-tdesigner

Version:

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

54 lines (51 loc) 1.24 kB
import uniqueId from '@form-create/utils/lib/unique'; import { localeProps } from '../../utils'; const label = '颜色选择器'; const name = 'colorPicker'; export default { menu: 'main', icon: 'icon-color', label, name, event: ['change', 'activeChange', 'focus', 'blur'], validate: ['string'], rule({ t }) { return { type: name, field: uniqueId(), title: t('com.colorPicker.name'), info: '', $required: false, props: {}, }; }, props(_, { t }) { return localeProps(t, name + '.props', [ { type: 'switch', field: 'disabled', }, { type: 'switch', field: 'enableAlpha', }, { type: 'select', field: 'format', options: [ { label: 'RGB', value: 'RGB' }, { label: 'RGBA', value: 'RGBA' }, { label: 'HSL', value: 'HSL', }, { label: 'HSLA', value: 'HSLA' }, { label: 'HSB', value: 'HSB' }, { label: 'HSV', value: 'HSV' }, { label: 'HSVA', value: 'HSVA' }, { label: 'HEX', value: 'HEX' }, ], }, ]); }, };