common.d.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. export declare type Classes = Array<string>;
  2. export interface Styles {
  3. [css: string]: string | number;
  4. }
  5. export declare type ImageEvent = any;
  6. export declare type PlainObject = {
  7. [key: string]: any;
  8. };
  9. export declare type OptionData = {
  10. label?: string;
  11. value?: string | number;
  12. } & PlainObject;
  13. export declare type TreeOptionData<T = string | number> = {
  14. children?: Array<TreeOptionData<T>> | boolean;
  15. label?: string;
  16. text?: string;
  17. value?: T;
  18. content?: string;
  19. } & PlainObject;
  20. export declare type SizeEnum = 'small' | 'medium' | 'large';
  21. export declare type ShapeEnum = 'circle' | 'round';
  22. export declare type HorizontalAlignEnum = 'left' | 'center' | 'right';
  23. export declare type VerticalAlignEnum = 'top' | 'middle' | 'bottom';
  24. export declare type LayoutEnum = 'vertical' | 'horizontal';
  25. export declare type ClassName = {
  26. [className: string]: any;
  27. } | ClassName[] | string;
  28. export declare type CSSSelector = string;
  29. export interface KeysType {
  30. value?: string;
  31. label?: string;
  32. disabled?: string;
  33. }
  34. export interface TreeKeysType extends KeysType {
  35. children?: string;
  36. }
  37. export interface HTMLElementAttributes {
  38. [attribute: string]: string;
  39. }
  40. export interface TScroll {
  41. bufferSize?: number;
  42. isFixedRowHeight?: boolean;
  43. rowHeight?: number;
  44. threshold?: number;
  45. type: 'lazy' | 'virtual';
  46. }
  47. export declare type InfinityScroll = TScroll;
  48. export interface ScrollToElementParams {
  49. index?: number;
  50. top?: number;
  51. time?: number;
  52. behavior?: 'auto' | 'smooth';
  53. }
  54. export interface ComponentScrollToElementParams extends ScrollToElementParams {
  55. key?: string | number;
  56. }