RefreshConstants.ets 1.84 KB
/**
 * The constant of refresh.
 */
export class RefreshConstants {
  /**
   * The off set coefficient.
   */
  static readonly Y_OFF_SET_COEFFICIENT: number = 0.1;
  /**
   * The animation delay time.
   */
  static readonly DELAY_ANIMATION_DURATION: number = 300;
  /**
   * The delay time.
   */
  static readonly DELAY_TIME: number = 200;

  /**
   * The animation duration.
   */
  static readonly ANIMATION_DURATION: number = 200;
  /**
   * The RefreshConstant constants.
   */
  static readonly RefreshConstant_DELAY_PULL_DOWN_REFRESH: number = 50;
  static readonly RefreshConstant_CLOSE_PULL_DOWN_REFRESH_TIME: number = 150;
  static readonly RefreshConstant_DELAY_SHRINK_ANIMATION_TIME: number = 1500;

  /**
   * The page size.
   */
  static readonly PAGE_SIZE: number = 20;

  /**
   * The refresh and load height.
   */
  static readonly CUSTOM_LAYOUT_HEIGHT: number = 80;
  /**
   * 下拉刷新,判定距离
   */
  static readonly CUSTOM_REFRESH_DECIDE_HEIGHT: number = 20;
  /**
   * Full the width.
   */
  static readonly FULL_WIDTH: string = '100%';
  /**
   * The NoMoreLayout constants.
   */
  static readonly NoMoreLayoutConstant_NORMAL_PADDING: number = 8;
  static readonly NoMoreLayoutConstant_TITLE_FONT: string = '12vp';
  static readonly NoMoreLayoutConstant_TITLE_COLOR: string = '#666666';
  /**
   * The RefreshLayout constants.
   */
  static readonly RefreshLayout_MARGIN_LEFT: string = '40%';
  static readonly RefreshLayout_TEXT_MARGIN_BOTTOM: number = 1;
  static readonly RefreshLayout_TEXT_MARGIN_LEFT: number = 7;
  static readonly RefreshLayout_TEXT_FONT_SIZE: number = 17;
  static readonly RefreshLayout_IMAGE_WIDTH: number = 18;
  static readonly RefreshLayout_IMAGE_HEIGHT: number = 18;
}
/**
 * The refresh state enum.
 */
export const enum RefreshState {
  DropDown = 0,
  Release = 1,
  Refreshing = 2,
  Success = 3,
  Fail = 4
}