configure.js 844 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { basicInputConfigureOptions } from '../../input-configure-options'
  2. export default {
  3. ...basicInputConfigureOptions(),
  4. defaultValue: {
  5. type: 'switch',
  6. label: '默认值',
  7. dependOn: ['activeValue', 'inactiveValue'],
  8. changeConfig: (config, { activeValue, inactiveValue }) => {
  9. config.activeValue = activeValue
  10. config.inactiveValue = inactiveValue
  11. return config
  12. }
  13. },
  14. activeText: {
  15. type: 'input',
  16. label: 'switch打开时的文字描述',
  17. limit: 20
  18. },
  19. inactiveText: {
  20. type: 'input',
  21. label: 'switch关闭时的文字描述',
  22. limit: 20
  23. },
  24. activeValue: {
  25. type: 'input',
  26. label: 'switch打开时的值',
  27. limit: 20
  28. },
  29. inactiveValue: {
  30. type: 'input',
  31. label: 'switch关闭时的值',
  32. limit: 20
  33. },
  34. required: {},
  35. requiredErrorMessage: {}
  36. }