用户工具

站点工具


在线工具:元器件:元器件多站查询

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
在线工具:元器件:元器件多站查询 [2026/10/11 21:58] – 移除 - 外部编辑 (Unknown date) 127.0.0.1在线工具:元器件:元器件多站查询 [2026/10/11 22:03] (当前版本) – hwwiki
行 1: 行 1:
 +<html><style>/* 作用域限定在 .msq 内,避免污染 DokuWiki 主题 */.msq {--primary: #1a6ee0;--primary-dark: #1258b8;--bg: #ffffff;--card: #ffffff;--border: #e2e8f0;--text: #1e293b;--text-2: #64748b;font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC","Microsoft YaHei", sans-serif;background: var(--bg);color: var(--text);display: flex;justify-content: center;padding: 12px 8px;box-sizing: border-box;}.msq * { box-sizing: border-box; margin: 0; padding: 0; }.msq .app { width: fit-content; max-width: 100%; margin: 0 auto; }.msq .logo { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }.msq .logo h1 { font-size: 17px; font-weight: 700; margin: 0; border: none; padding: 0; }.msq .logo .sub { font-size: 12px; color: var(--text-2); font-weight: 400; margin-left: 6px; }/* ===== 顶部标签栏 ===== */.msq .tabs {display: flex;gap: 4px;border-bottom: 1px solid var(--border);margin-bottom: 12px;}.msq .tab {display: inline-flex;align-items: center;gap: 7px;padding: 9px 16px;font-size: 14px;font-weight: 600;color: var(--text-2);background: transparent;border: none;border-bottom: 2px solid transparent;margin-bottom: -1px;cursor: pointer;transition: color .15s, border-color .15s;white-space: nowrap;font-family: inherit;}.msq .tab svg { flex: 0 0 auto; }.msq .tab svg * { stroke: currentColor; }.msq .tab:hover { color: var(--primary); }.msq .tab.active { color: var(--primary); border-bottom-color: var(--primary); }.msq .tab .badge {font-size: 11px;font-weight: 500;padding: 1px 7px;border-radius: 999px;background: var(--border);color: var(--text-2);}.msq .tab.active .badge { background: rgba(26,110,224,.12); color: var(--primary); }.msq .panel { display: none; }.msq .panel.active { display: block; }.msq .card {background: var(--card);border: 1px solid var(--border);border-radius: 10px;padding: 16px;box-shadow: 0 1px 3px rgba(0,0,0,.05);margin-bottom: 12px;}.msq .row { display: flex; gap: 10px; flex-wrap: wrap; }.msq .field { flex: 1 1 0; min-width: 0; }.msq .field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }.msq input[type="text"] {width: 100%;padding: 9px 11px;border: 1px solid var(--border);border-radius: 8px;font-size: 14px;outline: none;transition: border-color .15s, box-shadow .15s;background: #fff;color: var(--text);font-family: inherit;}.msq input[type="text"]:focus {border-color: var(--primary);box-shadow: 0 0 0 3px rgba(26,110,224,.12);}.msq .btn {padding: 9px 22px;background: var(--primary);color: #fff;border: none;border-radius: 8px;font-size: 14px;font-weight: 600;cursor: pointer;align-self: flex-end;transition: background .15s;font-family: inherit;}.msq .btn:hover { background: var(--primary-dark); }.msq .xsearch .xs-title { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }.msq .xsearch .xs-title b { color: var(--text); }.msq .xsearch .xs-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }.msq .xs-btn {font-size: 12px; padding: 4px 12px; border-radius: 6px;border: 1px solid var(--primary); background: #fff; color: var(--primary);cursor: pointer; transition: all .15s; font-family: inherit;}.msq .xs-btn:hover { background: var(--primary); color: #fff; }.msq .xs-btn.ghost { border-color: var(--border); color: var(--text-2); }.msq .xs-btn.ghost:hover { border-color: var(--text-2); background: var(--border); color: var(--text); }.msq .xs-count { font-size: 11px; color: var(--text-2); }.msq .xsearch .xs-hint { font-size: 11px; color: #b45309; margin-top: 6px; display: none; max-width: 460px; line-height: 1.5; }.msq .xsearch .xs-hint.show { display: block; }.msq .xsearch .xs-group { font-size: 11px; color: var(--text-2); margin: 10px 0 6px; }.msq .xsearch .xs-group:first-of-type { margin-top: 4px; }/* 统一网格布局:5 列,窄屏 2 列 */.msq .chips {display: grid;grid-template-columns: repeat(5, minmax(0, 1fr));gap: 6px;width: 660px;max-width: 100%;}@media (max-width: 680px) {.msq .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); width: auto; }}.msq .chip {font-size: 12px;padding: 5px 13px;border-radius: 999px;border: 1px solid var(--border);color: var(--text);background: #fff;transition: border-color .15s;display: inline-flex;align-items: center;justify-content: center;gap: 6px;white-space: nowrap;overflow: hidden;}.msq .chip a { color: inherit; text-decoration: none; }.msq .chip a:hover { color: var(--primary); }.msq .chip:hover { border-color: var(--primary); }.msq .chip input[type="checkbox"] { margin: 0; accent-color: var(--primary); cursor: pointer; }.msq .chip.off { opacity: .55; }.msq .chip.off a { color: var(--text-2); }</style><div class="msq" id="msq-root"><div class="app"><div class="logo"><svg width="22" height="22" viewBox="0 0 24 24" fill="none"><path d="M4 7h16M4 12h16M4 17h10" stroke="#1a6ee0" stroke-width="1.8" stroke-linecap="round"/></svg><h1>元器件多站查询<span class="sub">Datasheet / EDA库 / 购买 一键多站检索</span></h1></div><div class="tabs" role="tablist"><button class="tab active" id="msq-tab-ds" role="tab" aria-selected="true"><svg width="15" height="15" viewBox="0 0 24 24" fill="none"><path d="M6 2h9l5 5v15H6z" stroke-width="1.8" stroke-linejoin="round"/><path d="M15 2v5h5" stroke-width="1.8" stroke-linejoin="round"/><path d="M9 12h6M9 15.5h6M9 19h3" stroke-width="1.6" stroke-linecap="round"/></svg>Datasheet 查询<span class="badge" id="msq-badge-ds">18 站</span></button><button class="tab" id="msq-tab-eda" role="tab" aria-selected="false"><svg width="15" height="15" viewBox="0 0 24 24" fill="none"><rect x="3" y="3" width="7" height="7" rx="1.2" stroke-width="1.8"/><rect x="14" y="3" width="7" height="7" rx="1.2" stroke-width="1.8"/><rect x="3" y="14" width="7" height="7" rx="1.2" stroke-width="1.8"/><path d="M17.5 14v7M14 17.5h7" stroke-width="1.8" stroke-linecap="round"/></svg>EDA 库查询<span class="badge" id="msq-badge-eda">8 站</span></button><button class="tab" id="msq-tab-buy" role="tab" aria-selected="false"><svg width="15" height="15" viewBox="0 0 24 24" fill="none"><path d="M3 4h2l2.4 12.2a1.5 1.5 0 0 0 1.5 1.2H18a1.5 1.5 0 0 0 1.5-1.2L21 8H6"stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><circle cx="9.5" cy="20" r="1.4" stroke-width="1.6"/><circle cx="17.5" cy="20" r="1.4" stroke-width="1.6"/></svg>购买查询<span class="badge" id="msq-badge-buy">26 站</span></button></div><div class="panel active" id="msq-panel-ds" role="tabpanel"><div class="card"><div class="row"><div class="field"><label for="msq-ds-m">厂商(可选)</label><input type="text" id="msq-ds-m" placeholder="如 ST、TI、Murata" autocomplete="off"></div><div class="field"><label for="msq-ds-p">型号 *</label><input type="text" id="msq-ds-p" placeholder="如 STM32F103C8T6" autocomplete="off"></div><button class="btn" id="msq-ds-go">搜索</button></div></div><div id="msq-ds-results"></div></div><div class="panel" id="msq-panel-eda" role="tabpanel"><div class="card"><div class="row"><div class="field"><label for="msq-eda-p">型号 / 关键字 *</label><input type="text" id="msq-eda-p" placeholder="如 STM32F103C8T6、0603、AMS1117" autocomplete="off"></div><button class="btn" id="msq-eda-go">搜索</button></div></div><div id="msq-eda-results"></div></div><div class="panel" id="msq-panel-buy" role="tabpanel"><div class="card"><div class="row"><div class="field"><label for="msq-buy-p">型号 / 关键字 *</label><input type="text" id="msq-buy-p" placeholder="如 STM32F103C8T6、0603、AMS1117" autocomplete="off"></div><button class="btn" id="msq-buy-go">搜索</button></div></div><div id="msq-buy-results"></div></div></div></div><script>(function () { 
 +if (window.__multiSearchWidgetLoaded) return; 
 +window.__multiSearchWidgetLoaded = true; 
 +var $ = function (id) { return document.getElementById(id); }; 
 +var params = new URLSearchParams(location.search); 
 +function qs(s) { return encodeURIComponent(s); } 
 +// 每类站点的勾选状态(各面板独立) 
 +var SAVED = { ds: null, eda: null, buy: null }; 
 +// ========================================================= 
 +// 通用面板构建 
 +// ========================================================= 
 +function buildSearch(cfg) { 
 +var p = cfg.getP().trim(); 
 +var m = cfg.getM ? cfg.getM().trim() : ""; 
 +var card = document.createElement("div"); 
 +card.className = "card xsearch"; 
 +// 标题 
 +var title = document.createElement("div"); 
 +title.className = "xs-title"; 
 +if (p) { 
 +var b = document.createElement("b"); 
 +b.textContent = cfg.label(m, p); 
 +title.appendChild(document.createTextNode("已生成 ")); 
 +title.appendChild(b); 
 +title.appendChild(document.createTextNode(" 的" + cfg.kind + "查询链接,勾选后一键打开:")); 
 +} else { 
 +title.appendChild(document.createTextNode(cfg.emptyTip)); 
 +} 
 +card.appendChild(title); 
 +// 工具栏 
 +var toolbar = document.createElement("div"); 
 +toolbar.className = "xs-toolbar"; 
 +var selAll = document.createElement("button"); 
 +selAll.type = "button"; 
 +selAll.className = "xs-btn ghost"; 
 +var countSpan = document.createElement("span"); 
 +countSpan.className = "xs-count"; 
 +toolbar.appendChild(selAll); 
 +toolbar.appendChild(countSpan); 
 +card.appendChild(toolbar); 
 +var hint = document.createElement("div"); 
 +hint.className = "xs-hint"; 
 +if (!SAVED[cfg.key]) SAVED[cfg.key] = cfg.sites.map(function (s) { return s.def === true; }); 
 +var savedChecks = SAVED[cfg.key]; 
 +var boxes = []; 
 +var lastGroup = null, chips = null; 
 +cfg.sites.forEach(function (s, idx) { 
 +if (s.g !== lastGroup) { 
 +lastGroup = s.g; 
 +var g = document.createElement("div"); 
 +g.className = "xs-group"; 
 +g.textContent = s.g; 
 +card.appendChild(g); 
 +chips = document.createElement("div"); 
 +chips.className = "chips"; 
 +card.appendChild(chips); 
 +} 
 +var span = document.createElement("span"); 
 +span.className = "chip" + (p ? "" : " off"); 
 +var cb = document.createElement("input"); 
 +cb.type = "checkbox"; 
 +cb.checked = savedChecks[idx]; 
 +cb.addEventListener("change", function () { savedChecks[idx] = cb.checked; updateCount(); }); 
 +var a = document.createElement("a"); 
 +a.textContent = s.name; 
 +a.href = p ? s.u(m, p) : (s.home || ""); 
 +a.target = "_blank"; 
 +a.rel = "noopener"; 
 +span.appendChild(cb); 
 +span.appendChild(a); 
 +boxes.push(cb); 
 +chips.appendChild(span); 
 +}); 
 +card.appendChild(hint); 
 +function updateCount() { 
 +var n = 0; 
 +boxes.forEach(function (cb) { if (cb.checked) n++; }); 
 +countSpan.textContent = "已选 " + n + "/" + boxes.length; 
 +selAll.textContent = n === boxes.length ? "全不选" : "全选"; 
 +return n; 
 +} 
 +selAll.addEventListener("click", function () { 
 +var all = boxes.every(function (cb) { return cb.checked; }); 
 +boxes.forEach(function (cb, i) { cb.checked = !all; savedChecks[i] = cb.checked; }); 
 +updateCount(); 
 +}); 
 +updateCount(); 
 +// 打开所选站点 
 +cfg.open = function () { 
 +hint.className = "xs-hint"; 
 +if (!cfg.getP().trim()) { 
 +hint.textContent = "请先输入型号,再搜索。"; 
 +hint.className = "xs-hint show"; 
 +cfg.getPEl().focus(); 
 +return; 
 +} 
 +var blocked = 0; 
 +boxes.forEach(function (cb) { 
 +if (!cb.checked) return; 
 +var a = cb.nextElementSibling; 
 +if (!a.href) return; 
 +var w = window.open(a.href, "_blank", "noopener"); 
 +if (!w) blocked++; 
 +}); 
 +if (blocked > 0) { 
 +hint.textContent = 
 +"浏览器拦截了 " + blocked + " 个弹窗(默认只允许每次点击开 1 个)。" + 
 +"请在地址栏弹窗图标中选择「始终允许来自此站点的弹出式窗口」,或逐个点击站点名打开。"; 
 +hint.className = "xs-hint show"; 
 +} 
 +}; 
 +return card; 
 +} 
 +// ========================================================= 
 +// 站点列表 
 +// ========================================================= 
 +function engineQ(m, p) { return (m ? m + " " : "") + p + " pdf"; } 
 +var DS_SITES = [ 
 +// ---- 商城 ---- 
 +{ g: "商城", name: "立创商城", def: true, home: "https://www.szlcsc.com/", 
 +u: function (m, p) { return "https://so.szlcsc.com/global.html?k=" + qs(p); } }, 
 +{ g: "商城", name: "得捷 DigiKey", home: "https://www.digikey.cn/", 
 +u: function (m, p) { return "https://www.digikey.cn/zh/products/result?keywords=" + qs(p); } }, 
 +{ g: "商城", name: "Mouser", home: "https://www.mouser.cn/", 
 +u: function (m, p) { return "https://www.mouser.cn/c/?q=" + qs(p); } }, 
 +{ g: "商城", name: "element14", home: "https://cn.element14.com/", 
 +u: function (m, p) { return "https://cn.element14.com/search?st=" + qs(p); } }, 
 +{ g: "商城", name: "华秋", home: "https://www.hqchip.com/", 
 +u: function (m, p) { return "https://www.hqchip.com/search?keyword=" + qs(p); } }, 
 +// ---- 专业查询网站 ---- 
 +{ g: "专业查询网站", name: "半导小芯", def: true, home: "https://www.semiee.com/", 
 +u: function (m, p) { return "https://www.semiee.com/search?searchModel=" + qs(p); } }, 
 +{ g: "专业查询网站", name: "AllDatasheet", home: "https://www.alldatasheet.com/", 
 +u: function (m, p) { return "https://www.alldatasheet.com/view.jsp?Searchword=" + qs(p); } }, 
 +{ g: "专业查询网站", name: "Octopart", home: "https://octopart.com/", 
 +u: function (m, p) { return "https://octopart.com/zh/search?currency=CNY&specs=0&full_query=" + qs(p) + "+&q=" + qs(p) + "&nq=" + qs(p) + "&s=1&query_type=MPN"; } }, 
 +{ g: "专业查询网站", name: "芯查查", home: "https://www.xcc.com/", 
 +u: function (m, p) { return "https://www.xcc.com/chip/material/search?title=" + qs(p); } }, 
 +{ g: "专业查询网站", name: "icspec", home: "https://www.icspec.com/", 
 +u: function (m, p) { return "https://www.icspec.com/search/" + qs(p); } }, 
 +{ g: "专业查询网站", name: "SamacSys", def: true, home: "https://www.componentsearchengine.com/", 
 +u: function (m, p) { return "https://www.componentsearchengine.com/search?term=" + qs(p); } }, 
 +// ---- 搜索引擎 ---- 
 +{ g: "搜索引擎", name: "必应搜索", def: true, home: "https://cn.bing.com/", 
 +u: function (m, p) { return "https://cn.bing.com/search?q=" + qs(engineQ(m, p)); } }, 
 +{ g: "搜索引擎", name: "百度搜索", home: "https://www.baidu.com/", 
 +u: function (m, p) { return "https://www.baidu.com/s?wd=" + qs(engineQ(m, p)); } }, 
 +{ g: "搜索引擎", name: "Google 搜索", home: "https://www.google.com/", 
 +u: function (m, p) { return "https://www.google.com/search?q=" + qs(engineQ(m, p)); } }, 
 +// ---- 其他 ---- 
 +{ g: "其他", name: "datasheets.com", home: "https://www.datasheets.com/", 
 +u: function (m, p) { return "https://www.datasheets.com/search?q=" + qs(p); } }, 
 +{ g: "其他", name: "DatasheetArchive", home: "https://www.datasheetarchive.com/", 
 +u: function (m, p) { return "https://www.datasheetarchive.com/?q=" + qs(p); } }, 
 +{ g: "其他", name: "datasheets360", home: "https://www.datasheets360.com/", 
 +u: function (m, p) { return "https://www.datasheets360.com/search/results?query=" + qs(p); } }, 
 +{ g: "其他", name: "Datasheet4U", home: "https://datasheet4u.com/", 
 +u: function (m, p) { return "https://datasheet4u.com/share_search.php?sWord=" + qs(p); } } 
 +]; 
 +// 来源:hwwiki《如何查找元器件EDA库》附件 edasearch.zip / EDASearch.bat 
 +var EDA_SITES = [ 
 +// ---- 网上商城 ---- 
 +{ g: "网上商城", name: "得捷 DigiKey", def: true, home: "https://www.digikey.cn/", 
 +u: function (m, p) { return "https://www.digikey.cn/zh/products/result?KeyWords=" + qs(p) + "&WT.z_header=search_go"; } }, 
 +{ g: "网上商城", name: "ARROW", home: "https://www.arrow.com/zh-cn", 
 +u: function (m, p) { return "https://www.arrow.com/zh/search-result.html?keyword=" + qs(p) + "&currPage=1"; } }, 
 +{ g: "网上商城", name: "贸泽 Mouser", home: "https://www.mouser.cn/", 
 +u: function (m, p) { return "https://www.mouser.cn/c/?q=" + qs(p); } }, 
 +{ g: "网上商城", name: "element14", home: "https://cn.element14.com/", 
 +u: function (m, p) { return "https://cn.element14.com/search?st=" + qs(p) + "&gs=true"; } }, 
 +// ---- 专门的库网站 ---- 
 +{ g: "专门的库网站", name: "samacsys", def: true, home: "https://componentsearchengine.com/", 
 +u: function (m, p) { return "https://componentsearchengine.com/search?term=" + qs(p); } }, 
 +{ g: "专门的库网站", name: "Ultra Librarian", home: "https://www.ultralibrarian.com/", 
 +u: function (m, p) { return "https://app.ultralibrarian.com/search?queryText=" + qs(p); } }, 
 +{ g: "专门的库网站", name: "SnapMagic", home: "https://www.snapeda.com/", 
 +u: function (m, p) { return "https://www.snapeda.com/search/?q=" + qs(p); } }, 
 +{ g: "专门的库网站", name: "国创基础资源库", def: true, home: "https://www.bocangku.cn/", 
 +u: function (m, p) { return "https://www.bocangku.cn/component/search?keyWords=" + qs(p) + "&"; } } 
 +]; 
 +var BUY_SITES = [ 
 +// ---- 国内商城 ---- 
 +{ g: "国内商城", name: "立创商城", def: true, home: "https://www.szlcsc.com/", 
 +u: function (m, p) { return "https://so.szlcsc.com/global.html?k=" + qs(p); } }, 
 +{ g: "国内商城", name: "华秋商城", home: "https://www.hqchip.com/", 
 +u: function (m, p) { return "https://www.hqchip.com/search?keyword=" + qs(p); } }, 
 +{ g: "国内商城", name: "云汉芯城", home: "https://www.ickey.cn/", 
 +u: function (m, p) { return "https://search.ickey.cn/?keyword=" + qs(p); } }, 
 +{ g: "国内商城", name: "唯样科技", home: "https://www.oneyac.com/", 
 +u: function (m, p) { return "https://www.oneyac.com/search.html?keyword=" + qs(p); } }, 
 +{ g: "国内商城", name: "大联芯城", home: "https://www.dlchip.net/", 
 +u: function (m, p) { return "https://www.dlchip.net/so/" + qs(p); } }, 
 +{ g: "国内商城", name: "iCEasy商城", home: "https://www.iceasy.com/", 
 +u: function (m, p) { return "https://www.iceasy.com/search?keyword=" + qs(p); } }, 
 +{ g: "国内商城", name: "力源芯城", home: "https://www.icbase.com/", 
 +u: function (m, p) { return "https://www.icbase.com/ProResult.aspx?w=" + qs(p); } }, 
 +{ g: "国内商城", name: "芯智云城", home: "https://www.superic.com/", 
 +u: function (m, p) { return "https://www.superic.com/so/?keyword=" + qs(p); } }, 
 +{ g: "国内商城", name: "芯片超人", home: "https://www.icsuperman.com/", 
 +u: function (m, p) { return "https://dl.icsuperman.com/?key=" + qs(p); } }, 
 +{ g: "国内商城", name: "硬之城", home: "https://www.yzcx.com/", 
 +u: function (m, p) { return "https://www.yzcx.com/search?key=" + qs(p) + "&sp=2"; } }, 
 +{ g: "国内商城", name: "猎芯网", home: "https://www.ichunt.com/", 
 +u: function (m, p) { return "https://www.ichunt.com/s/?k=" + qs(p); } }, 
 +{ g: "国内商城", name: "淘宝", home: "https://www.taobao.com/", 
 +u: function (m, p) { return "https://s.taobao.com/search?q=" + qs(p); } }, 
 +{ g: "国内商城", name: "1688", home: "https://www.1688.com/", 
 +u: function (m, p) { return "https://s.1688.com/selloffer/offer_search.htm?keywords=" + qs(p); } }, 
 +// ---- 国外商城 ---- 
 +{ g: "国外商城", name: "得捷 DigiKey", def: true, home: "https://www.digikey.cn/", 
 +u: function (m, p) { return "https://www.digikey.cn/zh/products/result?keywords=" + qs(p); } }, 
 +{ g: "国外商城", name: "贸泽 Mouser", home: "https://www.mouser.cn/", 
 +u: function (m, p) { return "https://www.mouser.cn/c/?q=" + qs(p); } }, 
 +{ g: "国外商城", name: "ARROW", home: "https://www.arrow.com/zh-cn", 
 +u: function (m, p) { return "https://www.arrow.com/zh-cn/products/search?q=" + qs(p) + "&r=true"; } }, 
 +{ g: "国外商城", name: "element14", home: "https://cn.element14.com/", 
 +u: function (m, p) { return "https://cn.element14.com/search?st=" + qs(p); } }, 
 +{ g: "国外商城", name: "LCSC 全球站", home: "https://www.lcsc.com/", 
 +u: function (m, p) { return "https://www.lcsc.com/search?q=" + qs(p); } }, 
 +{ g: "国外商城", name: "Avnet 安富利", home: "https://www.avnet.com/", 
 +u: function (m, p) { return "https://www.avnet.com/apac/products/c/search?search=" + qs(p) + "&page=1&limit=20&orderby=&orderbydirection=asc"; } }, 
 +{ g: "国外商城", name: "RS 欧时", home: "https://www.rsonline.cn/", 
 +u: function (m, p) { return "https://www.rsonline.cn/web/c/?searchTerm=" + qs(p); } }, 
 +{ g: "国外商城", name: "Rochester 罗彻斯特", home: "https://www.rocelec.cn/", 
 +u: function (m, p) { return "https://www.rocelec.cn/search?searchType=part&q=" + qs(p); } }, 
 +// ---- 聚合比价 ---- 
 +{ g: "聚合比价", name: "Octopart", def: true, home: "https://octopart.com/", 
 +u: function (m, p) { return "https://octopart.com/zh/search?currency=CNY&specs=0&full_query=" + qs(p) + "+&q=" + qs(p) + "&nq=" + qs(p) + "&s=1&query_type=MPN"; } }, 
 +{ g: "聚合比价", name: "Findchips", home: "https://www.findchips.com/", 
 +u: function (m, p) { return "https://www.findchips.com/search/" + qs(p); } }, 
 +{ g: "聚合比价", name: "芯查查", home: "https://www.xcc.com/", 
 +u: function (m, p) { return "https://www.xcc.com/chip/material/search?title=" + qs(p); } } 
 +]; 
 +// ========================================================= 
 +// 三个面板实例 
 +// ========================================================= 
 +function makeWidget(o) { 
 +var el = { 
 +pEl: $("msq-" + o.id + "-p"), 
 +goEl: $("msq-" + o.id + "-go"), 
 +resultsEl: $("msq-" + o.id + "-results"), 
 +mEl: o.hasM ? $("msq-" + o.id + "-m") : null 
 +}; 
 +if (el.mEl && params.get("m")) el.mEl.value = params.get("m"); 
 +if (params.get("p")) el.pEl.value = params.get("p"); 
 +var cfg = { 
 +key: o.key, 
 +sites: o.sites, 
 +kind: o.kind, 
 +emptyTip: o.emptyTip, 
 +getPEl: function () { return el.pEl; }, 
 +getP: function () { return el.pEl.value; }, 
 +getM: el.mEl ? function () { return el.mEl.value; } : null, 
 +label: function (m, p) { return el.mEl ? ((m ? m + " " : "") + p) : p; }, 
 +open: null 
 +}; 
 +function render() { 
 +el.resultsEl.innerHTML = ""; 
 +el.resultsEl.appendChild(buildSearch(cfg)); 
 +} 
 +var timer = null; 
 +var inputs = el.mEl ? [el.mEl, el.pEl] : [el.pEl]; 
 +inputs.forEach(function (i) { 
 +i.addEventListener("input", function () { 
 +if (timer) clearTimeout(timer); 
 +timer = setTimeout(render, 250); 
 +}); 
 +}); 
 +var opening = false; 
 +function search() { 
 +if (opening) return; 
 +opening = true; 
 +setTimeout(function () { opening = false; }, 500); 
 +if (timer) { clearTimeout(timer); timer = null; } 
 +render(); 
 +if (cfg.open) cfg.open(); 
 +} 
 +el.goEl.addEventListener("click", search); 
 +inputs.forEach(function (i) { 
 +i.addEventListener("keydown", function (ev) { if (ev.key === "Enter") search(); }); 
 +}); 
 +render(); 
 +return el; 
 +} 
 +var dsEl = makeWidget({ 
 +id: "ds", key: "ds", sites: DS_SITES, hasM: true, kind: "Datasheet", 
 +emptyTip: "勾选站点,输入型号后点击「搜索」一键打开所选网站:" 
 +}); 
 +var edaEl = makeWidget({ 
 +id: "eda", key: "eda", sites: EDA_SITES, hasM: false, kind: "EDA 库", 
 +emptyTip: "勾选站点,输入型号后点击「搜索」一键打开所选商城 / 库网站:" 
 +}); 
 +var buyEl = makeWidget({ 
 +id: "buy", key: "buy", sites: BUY_SITES, hasM: false, kind: "购买", 
 +emptyTip: "勾选站点,输入型号后点击「搜索」一键打开所选商城:" 
 +}); 
 +// ========================================================= 
 +// 标签切换 
 +// DokuWiki 嵌入场景下不改动 location.hash(避免跳转/重载) 
 +// ========================================================= 
 +var KEYS = ["ds", "eda", "buy"]; 
 +var tabs = {}, panels = {}, focusEls = { ds: dsEl.pEl, eda: edaEl.pEl, buy: buyEl.pEl }; 
 +KEYS.forEach(function (k) { 
 +tabs[k] = $("msq-tab-" + k); 
 +panels[k] = $("msq-panel-" + k); 
 +tabs[k].addEventListener("click", function () { activate(k); }); 
 +}); 
 +function activate(key, focusInput) { 
 +if (KEYS.indexOf(key) < 0) key = "ds"; 
 +KEYS.forEach(function (k) { 
 +var on = k === key; 
 +tabs[k].classList.toggle("active", on); 
 +panels[k].classList.toggle("active", on); 
 +tabs[k].setAttribute("aria-selected", on ? "true" : "false"); 
 +}); 
 +if (focusInput) focusEls[key].focus(); 
 +} 
 +// 初始标签:?tab=eda|buy 
 +var initial = params.get("tab"); 
 +activate(KEYS.indexOf(initial) >= 0 ? initial : "ds"); 
 +// 站点数角标 
 +$("msq-badge-ds").textContent = DS_SITES.length + " 站"; 
 +$("msq-badge-eda").textContent = EDA_SITES.length + " 站"; 
 +$("msq-badge-buy").textContent = BUY_SITES.length + " 站"; 
 +})();</script></html>