configure.js 728 B

12345678910111213141516171819202122232425262728
  1. import { basicInputConfigureOptions } from '../../input-configure-options'
  2. export const viewTypeOptions = ['year', 'month', 'week', 'date', 'datetime']
  3. export default {
  4. ...basicInputConfigureOptions(),
  5. viewType: {
  6. label: '显示类型',
  7. type: 'select',
  8. options: viewTypeOptions //, 'dates'
  9. },
  10. isTimestamp: {
  11. label: '是否获取时间戳',
  12. type: 'switch'
  13. },
  14. defaultValue: {
  15. label: '是否使用当前时间做默认值',
  16. type: 'switch',
  17. inactiveValue: null,
  18. activeValue: String(new Date()) // 数据没有格式化,选中默认值会有问题
  19. },
  20. placeholder: {},
  21. formatter: {
  22. label: '展示格式',
  23. type: 'input'
  24. },
  25. required: {},
  26. requiredErrorMessage: {}
  27. }