跳转到主要内容

格式化标签、日期、样式

点击视图链接以查看它所支持的模板。

默认视图

扩展视图

所有视图通用

指定模板

您可以通过两种方式设置模板:要么来自代码,要么来自 HTML 标记。

使用代码指定模板

默认情况下,模板可以定义为接收事件对象或日期参数的 JS 函数,必须返回一个 HTML 字符串,该字符串将插入到布局中:

scheduler.templates.event_text = (start, end, event) => {
return `<a href='http://some.com/details.php?for=${event.id}'>${event.text}</a>`;
};

通过标记指定模板

另外,模板也可以从 HTML 以声明方式定义。这种方法需要向页面添加 html_templates 扩展。 一旦在页面上激活该扩展,您可以按如下方式指定模板:

<div class="template:event_text">
<a href='http://some.com/details.php?for="{event.id}"'>{event.text}</a>
</div>

完整的模板列表可以在 API 中找到。

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.