api 모듈도 수정

This commit is contained in:
주수현
2025-06-20 10:02:05 +09:00
parent c8123527d9
commit 9bef810505
3 changed files with 9 additions and 5 deletions

View File

@@ -172,7 +172,7 @@
const button = document.createElement('button');
button.type = 'button';
button.className = depth === 1 ? 'tit onedepth' : depth === 2 ? 'tit twodepth' : '';
button.className = 'tit';
button.setAttribute('data-id', node.id || '');
button.setAttribute('data-parent-id', node.parentId || '');
button.setAttribute('data-order-no', node.orderNo || '0');
@@ -193,7 +193,7 @@
if (node.nodes && node.nodes.length > 0) {
const childUl = document.createElement('ul');
childUl.className = depth === 1 ? 'list-twodepth' : 'list-threedepth';
childUl.className = depth === 1 ? 'list-detail' : 'list-detail';
li.appendChild(childUl);
node.nodes.forEach(child => renderNode(child, childUl, depth + 1));
}