@form-create/vant-designer
Version:
基于Vant的移动端低代码可视化表单设计器,可以通过拖拽的方式快速创建表单,提高开发者对表单的开发效率。
44 lines (41 loc) • 940 B
JavaScript
import {localeProps, makeTitleRule} from '../../utils';
const label = '文字';
const name = 'text';
export default {
menu: 'aide',
icon: 'icon-span',
label,
name,
rule({t}) {
return {
type: 'div',
title: '',
native: true,
style: {
whiteSpace: 'pre-line',
display: 'block',
width: '100%',
},
children: [t('com.text.name')],
};
},
watch: {
formCreateNative({value, rule}) {
if (value) {
rule.title = '';
}
}
},
props(_, {t}) {
return localeProps(t, name + '.props', [
...makeTitleRule(t),
{
type: 'input',
field: 'formCreateChild',
props: {
type: 'textarea'
}
}
]);
}
};