9afce6f6创建于 2025年5月7日历史提交
/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * 内置默认属性值
 *
 * @since 1.0
 */
export class CommonConstants {
  // 默认背景条伸缩比例
  static readonly DEFAULT_INDICATOR_EXPAND = 1.5;
  // 默认动画时长
  static readonly DEFAULT_ANIMATION_DURATION = 240;
  // 默认页签项宽度(单位: px)
  static readonly DEFAULT_LIST_ITEM_WIDTH = 90;
  // 默认页签条到达边界后继续移动的偏移相对于手滑偏移的比例
  static readonly DEFAULT_LIST_RELATIVE_RATIO = 0.25;
  // 页签条放手回弹时间
  static readonly DEFAULT_TAB_SPRING_DURATION = 180;
  // 页签条高度
  static readonly DEFAULT_BAR_HEIGHT = 60;
  // 100%
  static readonly FULL_PERCENT = "100%";
  // 40%
  static readonly FORTY_PERCENT = "40%";
  // 默认页签内容选中字体大小
  static readonly DEFAULT_TAB_BAR_SELECT_FONT_SIZE = 17;
  // 默认页签内容未选中字体大小
  static readonly DEFAULT_TAB_BAR_UNSELECT_FONT_SIZE = 16;
  // 默认页签内容字体颜色
  static readonly DEFAULT_TAB_BAR_font_color = "0x000000";
  // Background模式的背景条颜色
  static readonly BACKGROUND_INDICATOR_COLOR = 0xC0C0C0;
  // Background模式的背景条高度
  static readonly BACKGROUND_INDICATOR_HEIGHT = "80%";
  // Background模式的背景条边框圆角
  static readonly BACKGROUND_INDICATOR_BORDER_RADIUS = "40%";
  // Background模式的背景条对齐模式
  static readonly BACKGROUND_INDICATOR_ALIGN = VerticalAlign.Center;
  // thinStrip模式的背景条颜色
  static readonly THINSTRIP_INDICATOR_COLOR = 0xFF4500;
  // Background模式的背景条高度
  static readonly THINSTRIP_INDICATOR_HEIGHT = 3;
  // Background模式的背景条的边框圆角
  static readonly THINSTRIP_INDICATOR_BORDER_RADIUS = "40%";
  // Background模式的背景条对齐模式
  static readonly THINSTRIP_INDICATOR_ALIGN = VerticalAlign.Bottom;
  // tab标题
  static readonly DEFAULT_TITLE1_TAB = "标题1";
  // tab标题
  static readonly DEFAULT_TITLE2_TAB = "标题2";
  // tab标题
  static readonly DEFAULT_TITLE3_TAB = "标题3";
  // tab标题
  static readonly DEFAULT_TITLE4_TAB = "标题4";
  // tab内容字体大小
  static readonly DEFAULT_TAB_CONTENT_FONT_SIZE = 40;
  // 背景条宽度
  static readonly DEFAULT_INDICATOR_WIDTH = 90;
  // 背景条高度
  static readonly DEFAULT_INDICATOR_HEIGHT = 40;
  // 默认背景条边角半径
  static readonly DEFAULT_INDICATOR_BORDER_RADIUS = 20;
}