(stepIndex)
| 1057 | } |
| 1058 | |
| 1059 | function scrollToStep(stepIndex) { |
| 1060 | const stepElement = document.getElementById(`step-${stepIndex}`); |
| 1061 | if (stepElement) { |
| 1062 | stepElement.scrollIntoView({ |
| 1063 | behavior: 'smooth', |
| 1064 | block: 'start' |
| 1065 | }); |
| 1066 | |
| 1067 | // 更新活跃的导航项 |
| 1068 | updateActiveNavItem(stepIndex); |
| 1069 | |
| 1070 | // 如果步骤是收起的,自动展开 |
| 1071 | const stepContent = document.getElementById(`step-content-${stepIndex}`); |
| 1072 | if (stepContent && !stepContent.classList.contains('show')) { |
| 1073 | const collapseInstance = new bootstrap.Collapse(stepContent, { |
| 1074 | toggle: false |
| 1075 | }); |
| 1076 | collapseInstance.show(); |
| 1077 | } |
| 1078 | } |
| 1079 | } |
| 1080 | |
| 1081 | function scrollToBrowserStep(parentIndex, browserStepId) { |
| 1082 | const browserStepElement = document.getElementById(`browser-step-${parentIndex}-${browserStepId}`); |
nothing calls this directly
no test coverage detected