divider.js 764 B

12345678910111213141516171819202122232425262728293031
  1. import {localeOptions, localeProps} from '../../utils';
  2. const label = '分割线';
  3. const name = 'elDivider';
  4. export default {
  5. menu: 'aide',
  6. icon: 'icon-divider',
  7. label,
  8. name,
  9. rule({t}) {
  10. return {
  11. type: name,
  12. props: {},
  13. children: [t('com.elDivider.name')],
  14. };
  15. },
  16. props(_, {t}) {
  17. return localeProps(t, name + '.props', [{
  18. type: 'input',
  19. field: 'formCreateChild',
  20. }, {
  21. type: 'select',
  22. field: 'contentPosition',
  23. options: localeOptions(t, [{label: 'left', value: 'left'}, {label: 'right', value: 'right'}, {
  24. label: 'center',
  25. value: 'center'
  26. }])
  27. }]);
  28. }
  29. };