最后更新于1个月前
获取所有标签群组。
返回 Promise<tagGroups: Object[]> - tagGroups 查询结果。
Promise<tagGroups: Object[]>
返回 Promise<tagGroup: Object> - 新建立的标签群组
Promise<tagGroup: Object>
实例方法
保存标签群组修改。
返回 Promise<tagGroup: Object> - 保存结果。
删除标签群组。
返回 Promise<result: boolean> - result是否删除成功
Promise<result: boolean>
透过 eagle.tagGroup API 可以方便存取当前应用中的标签群组。
// 取得所有标签群组 const tagGroups = (await eagle.tagGroups.get());
const tagGroups = (await eagle.tagGroups.get());
await eagle.tagGroup.create({ name: "new group", color: "red", tags: ["tag1", "tag2"] });
const tagGroups = (await eagle.tagGroups.get()); const tagGroup = tagGroups[0]; tagGroup.name = "new name"; tagGroup.color = "red"; // red, orange, yellow, green, aqua, blue, purple, pink tagGroup.tags = ["tag1", "tag2"]; await tagGroup.save();
const tagGroups = (await eagle.tagGroups.get()); const tagGroup = tagGroups[0]; await tagGroup.remove();