合并分支
await mn.api('/notes/' + noteid + '/merge-branch', {
method: 'POST',
body: { recursive: true, confirm: true }
});{
"willMerge": [
{
"noteid": "8AEDDBF9-BDD8-4D91-AC31-5DEAC8DF1DA1",
"title": "(1.2)"
}
],
"notMergedCount": 0,
"skipped": []
}卡片与摘录
合并子卡
把子卡的内容并进该卡,等同于卡片菜单上的合并分支。默认只并直接子卡,
带 recursive 时连整棵子树一起并。
并非所有子卡都会被并入:拒绝接收的卡原样留在树上,数量看响应里的 notMergedCount;
摘要卡与子脑图根卡会被自动跳过,原因在 skipped 里。
响应里的 willMerge 是本次计划并入的卡,可据此先检查再决定是否提交。
POST
/
notes
/
{noteid}
/
merge-branch
合并分支
await mn.api('/notes/' + noteid + '/merge-branch', {
method: 'POST',
body: { recursive: true, confirm: true }
});{
"willMerge": [
{
"noteid": "8AEDDBF9-BDD8-4D91-AC31-5DEAC8DF1DA1",
"title": "(1.2)"
}
],
"notMergedCount": 0,
"skipped": []
}路径参数
卡片的 noteid。取自卡片命令响应的 noteid、POST /notes/batch-get 响应里 items[].noteid,或 GET /ui-state 的 state.focusnoteid。