configure.js 903 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { basicInputConfigureOptions } from '../../input-configure-options'
  2. export default {
  3. ...basicInputConfigureOptions(),
  4. max: {
  5. label: '最大值',
  6. type: 'number',
  7. min: 1
  8. },
  9. // lowThreshold: {
  10. // label: '低分界限',
  11. // type: 'number',
  12. // min: 1
  13. // },
  14. // highThreshold: {
  15. // label: '高分界限',
  16. // type: 'number',
  17. // dependOn: ['max'],
  18. // changeConfig: (config, { max, allowHalf } = {}) => {
  19. // config.max = max
  20. // config.allowHalf = allowHalf
  21. // return config
  22. // },
  23. // min: 1
  24. // },
  25. allowHalf: {
  26. label: '允许半选',
  27. type: 'switch'
  28. },
  29. defaultValue: {
  30. type: 'rate',
  31. dependOn: ['max', 'allowHalf'],
  32. changeConfig: (config, { max, allowHalf } = {}) => {
  33. config.max = max
  34. config.allowHalf = allowHalf
  35. return config
  36. }
  37. },
  38. required: {},
  39. requiredErrorMessage: {}
  40. }