跳到主要内容

uid

Description

返回一个唯一的 id

uid: () => number

Returns

  • id - (number) - 一个唯一的 id

Example

var id = gantt.uid();

Details

生成的 id 在同一页面内是唯一的,但不是全局。
因此你可以在页面内的逻辑中使用该方法。但它不足以作为数据库的 ID。

Change log

  • 在版本 4.0 中新增
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.