form-tdesigner
Version:
好用的Vue低代码可视化表单设计器,可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率。
41 lines (37 loc) • 903 B
JavaScript
import uniqueId from '@form-create/utils/lib/unique';
import { localeOptions, localeProps } from '../../utils';
const label = '时间区间';
const name = 'timeRange';
export default {
menu: 'main',
icon: 'icon-time-range',
label,
name,
event: ['change', 'blur', 'focus', 'visibleChange'],
rule({ t }) {
return {
type: 't-time-range-picker',
field: uniqueId(),
title: t('com.timeRange.name'),
info: '',
value: [],
$required: false,
props: {},
};
},
props(_, { t }) {
return localeProps(t, 'timePicker.props', [
{ type: 'switch', field: 'readonly' },
{
type: 'switch',
field: 'disabled',
},
{
type: 'switch',
field: 'clearable',
value: true,
},
{ type: 'switch', field: 'allowInput', value: true },
]);
},
};