unsetWorkTime
Description
在甘特图中取消工作时间的设定
unsetWorkTime: (config: object) => void,
Parameters
config- (必填) object - 一个时间段的配置对象
Example
gantt.config.work_time = true;
// 将工作日的工作时间从 ["8:00-17:00"] 更新为 ["9:00-18:00"]
gantt.setWorkTime({ hours:["9:00-18:00"] });
// 移除工作时间配置
gantt.unsetWorkTime({ hours:["9:00-18:00"] });
Related samples
Details
版本 4.1 中新增
配置对象属性
配置对象可以包含以下属性:
属性 | 描述 |
|---|---|
| day | 星期几的数字表示 [0 (星期日) - 6 (星期六)]. 注意一次只能设置一天 |
| |
| date | 一个用于设定/取消工作时间的具体日期 |
| |
| hours | 一个以 'from'-'to' 对形式表示的工作时间数组。 'false' 值用于取消工作时间,'true' (默认值) 应用默认工作时间(["8:00-17:00"]) |
| |
Related API
Related Guides
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.