setupDefaults.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import { CommafyOptions } from "./commafy"
  2. import { FirstDayOfWeek } from "./getWhatWeek"
  3. import { ToDateStringFormats } from "./toDateString"
  4. export interface SetupDefaults {
  5. /**
  6. * 全局唯一标识
  7. */
  8. keyId?: number
  9. /**
  10. * 默认树的转换配置
  11. * 用于 toArrayTree()、toTreeArray()
  12. */
  13. treeOptions?: {
  14. strict?: boolean;
  15. parentKey?: string;
  16. key?: string;
  17. children?: string;
  18. data?: string;
  19. [key: string]: any;
  20. };
  21. /**
  22. * 默认解析的日期格式
  23. * 用于 toDateString()
  24. */
  25. parseDateFormat?: string;
  26. /**
  27. * 默认格式化日期的规则
  28. * 用于 toDateString()
  29. */
  30. parseDateRules?: ToDateStringFormats;
  31. /**
  32. * 默认周视图的起始天
  33. * 用于 getWhatWeek()、getYearWeek()、toDateString()
  34. */
  35. firstDayOfWeek?: FirstDayOfWeek;
  36. /**
  37. * 分隔函数配置
  38. * 用于 commafy()
  39. */
  40. commafyOptions?: CommafyOptions;
  41. /**
  42. * 已被 parseDateRules 替换
  43. * @deprecated
  44. */
  45. formatStringMatchs?: any;
  46. /**
  47. * 已被 parseDateFormat 替换
  48. * @deprecated
  49. */
  50. formatString?: string;
  51. [key: string]: any;
  52. }
  53. export default SetupDefaults