@form-create/vant-designer
Version:
基于Vant的移动端低代码可视化表单设计器,可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率。
54 lines (51 loc) • 1.35 kB
JavaScript
import {localeOptions, localeProps} from '../../utils';
const label = '通知';
const name = 'vanNoticeBar';
export default {
menu: 'aide',
icon: 'icon-alert',
label,
name,
event: ['click', 'close', 'replay'],
rule({t}) {
return {
type: name,
props: {
text: t('com.' + name + '.description'),
},
children: []
};
},
props(_, {t}) {
return localeProps(t, name + '.props', [
{
type: 'select',
field: 'mode',
options: localeOptions(t, [
{label: 'closeable', value: 'closeable'},
{label: 'link', value: 'link'},
])
}, {
type: 'input',
field: 'text',
}, {
type: 'ColorInput',
field: 'color',
}, {
type: 'ColorInput',
field: 'background',
}, {
type: 'inputNumber',
field: 'speed',
value: 60,
}, {
type: 'switch',
field: 'scrollable',
value: true,
}, {
type: 'switch',
field: 'wrapable',
}
]);
}
};