跳到主要内容

constants

Description

存储各种常量以减少代码中魔术数字的使用

constants: any

Example

document.addEventListener("keypress", function(e){
var keys = gantt.constants.KEY_CODES;
if(e.keyCode === keys.ENTER){
// 在按下回车时执行
}
});

Details

用于存储各种常量以减少代码中魔术数字的使用。目前仅存储 KEY_CODES 对象

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.