函数currentSubgoal
返回当前subgoal。
currentSubgoal()
当前subgoal的对象,格式如下:
{
"title": "subgoal的标题",
"description": "subgoal的描述",
"state": "subgoal的状态",
"priority": "subgoal的优先级",
"dueDate": "subgoal的截止日期"
}
返回值为null表示当前没有subgoal。
var subgoal = currentSubgoal();
if (subgoal !== null) {
console.log("当前subgoal的标题为:" + subgoal.title);
} else {
console.log("当前没有subgoal。");
}