跳转到主要内容

UNITS_scale_text

信息

此功能仅在 PRO 版本中可用。

Description

定义 X 轴上显示的项目

UNITS_scale_text: (key: string, label: string, unit: object, date: Date) => string;

Parameters

  • key - (required) string - 单位的标识符
  • label - (required) string - 单位的标签
  • unit - (required) object - 表示单位的对象,包括 'key' 和 'label'
  • date - (required) Date - 对应某列的日期(用于多天 Units 视图)

Returns

  • text - (string) - 在 scheduler 中显示的 HTML 内容

Example

scheduler.templates.unit_scale_text = function(key, label, unit, date) {
if (option.css) {
return "<span className='" + option.css + "'>" + label + "</span>";
} else {
return label;
}
};

Applicable views: Units view

Details

注释

该模板需要启用 units 插件。

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.