SMT整线解决系统
SMT整线解决系统

电路板X射线检测设备的基础参数和优势

电路板X射线检测设备的基础参数和优势
X射线检测这种非破坏性的方式是SMT贴片加工检测过程中无法替代的关键流程,而际诺斯将这款精度极高、效率极快、防辐射能力极强的检测设备引入,为客户带来了高质量电路板成品的检测结果深受广大厂商的喜爱。
`, "text/html").body; const h2Elements = Array.from(decoded.querySelectorAll('h2')); // 移除最后一个 h2 及其后面的所有内容 if (h2Elements.length > 0) { const lastH2 = h2Elements[h2Elements.length - 1]; let nodeToRemove = lastH2; while (nodeToRemove && nodeToRemove !== decoded.lastChild) { const next = nodeToRemove.nextElementSibling; if (next && next.tagName.toLowerCase() !== 'h2') { next.remove(); } else { break; } } lastH2.remove(); h2Elements.pop(); // 同步更新数组 } const result = []; h2Elements.forEach((h2, index) => { const currentTitle = h2.textContent.trim(); const currentContent = []; let nextNode = h2.nextElementSibling; while (nextNode && nextNode.tagName.toLowerCase() !== 'h2') { if (nextNode.tagName.toLowerCase() === 'img') { const imgSrc = nextNode.getAttribute('src'); if (imgSrc) { nextNode.setAttribute('src', fixImagePath(imgSrc)); } } currentContent.push(nextNode.outerHTML.trim()); nextNode = nextNode.nextElementSibling; } const cleanedContent = currentContent.join('\n') .replace(//gi, '/SMT/') .replace(//gi, '') .trim(); result.push({ title: currentTitle, content: cleanedContent, id: `tab-pane-${index}` }); console.log(`目录 ${index + 1}:${currentTitle} =====`); console.log(cleanedContent); console.log('------------------------------------------'); }); function fixImagePath(src) { if (src.startsWith('/')) return window.location.origin + src; return src; } const navTabs = document.getElementById('myTab'); const tabContent = document.getElementById('tabContentContainer'); result.forEach((group, index) => { const tab = document.createElement('a'); tab.className = 'nav-link' + (index === 0 ? ' active' : ''); tab.href = `#${group.id}`; tab.innerText = group.title; navTabs.appendChild(tab); const pane = document.createElement('div'); pane.className = 'tab-pane' + (index === 0 ? ' active' : ''); pane.id = group.id; pane.innerHTML = group.content; tabContent.appendChild(pane); }); document.querySelectorAll('.tabbedSystem .nav-link').forEach(tab => { tab.addEventListener('click', (e) => { e.preventDefault(); document.querySelectorAll('.tabbedSystem .nav-link').forEach(t => t.classList.remove('active')); tab.classList.add('active'); const targetId = tab.getAttribute('href').replace('#', ''); document.querySelectorAll('#tabContentContainer .tab-pane').forEach(pane => { pane.classList.remove('active'); }); const activePane = document.getElementById(targetId); if (activePane) { activePane.classList.add('active'); } }); }); });
`, "text/html").body; const h2s = decoded.querySelectorAll("h2"); const h2 = h2s[h2s.length - 1]; // const container = document.getElementById("lastSectionContainer"); if (!h2) return; // 插入主标题 const titleElement = document.createElement('h2'); titleElement.className = 'custom-main-title'; titleElement.textContent = h2.textContent.trim(); container.appendChild(titleElement); // 创建滚动容器 const scrollContainer = document.createElement('div'); scrollContainer.className = 'custom-scroll-wrapper'; const textColumn = document.createElement('div'); textColumn.className = 'custom-column custom-texts'; const imageColumn = document.createElement('div'); imageColumn.className = 'custom-column custom-images'; let next = h2.nextElementSibling; while (next) { if (next.tagName.toLowerCase() === 'h3') { const section = document.createElement('div'); section.className = 'custom-section'; const textWrap = document.createElement('div'); textWrap.className = 'custom-text'; textWrap.appendChild(next.cloneNode(true)); // 克隆 h3 const imgWrap = document.createElement('div'); imgWrap.className = 'custom-image'; let scan = next.nextElementSibling; while (scan && !/^h[23]$/i.test(scan.tagName)) { const clone = scan.cloneNode(true); // 如果是图片段落 if (clone.querySelector('img')) { const imgs = clone.querySelectorAll('img'); imgs.forEach(img => { imgWrap.appendChild(img.cloneNode(true)); }); } else { textWrap.appendChild(clone); } scan = scan.nextElementSibling; } textColumn.appendChild(textWrap); imageColumn.appendChild(imgWrap); next = scan; } else { next = next.nextElementSibling; } } scrollContainer.appendChild(textColumn); scrollContainer.appendChild(imageColumn); container.appendChild(scrollContainer); // 同步滚动 let isScrolling = false; function syncScroll(source, target) { if (isScrolling) return; isScrolling = true; const sourceScrollTop = source.scrollTop(); const sourceScrollHeight = source[0].scrollHeight; const targetScrollHeight = target[0].scrollHeight; const targetScrollTop = (sourceScrollTop / sourceScrollHeight) * targetScrollHeight; requestAnimationFrame(() => { target.scrollTop(targetScrollTop); isScrolling = false; }); } $('.custom-texts').on('scroll', function () { syncScroll($(this), $('.custom-images')); }); $('.custom-images').on('scroll', function () { syncScroll($(this), $('.custom-texts')); }); });
同类推荐
← 左右滑动查看更多 →
客户留言
留言后下载解决方案相关内容

您的姓名*

您的电话号*

您的邮箱号

您的公司名称*

留言板

姓名*

邮箱

验证码*

电话*

公司*

基本需求*

提交信息即代表同意《隐私政策》
{/block}