diff --git a/CHANGELOG.md b/CHANGELOG.md index 1331d7e..6c9057f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 1.0.5 + +1. 新增扫码入库功能 +2. 修改 README 文档 +3. 新增检查更新功能 +4. 修复已知问题 + # 1.0.3 1. 由于可能存在的安全原因,移除了使用 Cookie 获取立创商城订单的功能,相关功能已被废弃 diff --git a/README.md b/README.md index 273ece5..a81cebe 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,15 @@ V2.2 用户菜单栏将直接出现“LEYE”选项;V3 用户若未开启“ ## 器件入库 -扩展支持从立创商城单 Excel 文档以及 CID 导入器件。 +扩展支持从立创商城单 Excel 文档、立创商城物料二维码以及 CID 导入器件。  +> **Tip: 扫描立创商城二维码导入器件** +> +> 在 V1.0.5 版本以上,可以通过扫描立创商城物料包装上的二维码导入器件,扫描后会自动识别 CID 并导入对应器件。 +>  + ### 批量出库 打开本页面后将自动整理 BOM 与 LEYE 库存相比较,非立创商城器件(无 CID)显示为红底,不在 LEYE 库存内的器件显示为黄底,在 LEYE 库存内的器件显示为绿底。 @@ -62,4 +67,9 @@ V2.2 用户菜单栏将直接出现“LEYE”选项;V3 用户若未开启“ ## 开源许可 +本扩展使用以下开源软件: +- [jsQR](https://www.jsdelivr.com/package/npm/jsqr):二维码解析库,使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 许可协议授权 +- [xlsx](https://www.jsdelivr.com/package/npm/xlsx):Excel 解析库,使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 许可协议授权 +- [Tailwind CSS](https://www.jsdelivr.com/package/npm/tailwindcss):CSS 框架,使用 [MIT License](https://choosealicense.com/licenses/mit/) 许可协议授权 + 本扩展使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 开源许可协议,商业/教育用途请考虑联系开发者获取常规版。 diff --git a/extension.json b/extension.json index 12c01e7..a208729 100644 --- a/extension.json +++ b/extension.json @@ -3,7 +3,7 @@ "uuid": "944f7c94a8ca485e848f1118effcbb9a", "displayName": "LEYE", "description": "LEYE 电子元器件库存管理系统 EDA 联动扩展", - "version": "1.0.3", + "version": "1.0.5", "publisher": "Mr_Fang", "engines": { "eda": "^3.2.80" diff --git a/iframe/about.html b/iframe/about.html index b4727e7..1702275 100644 --- a/iframe/about.html +++ b/iframe/about.html @@ -221,18 +221,13 @@ document.getElementById('check').addEventListener('click', function (event) { event.preventDefault(); - eda.sys_Message.showToastMessage( - '🥺 暂不支持', - ESYS_ToastMessageType.ERROR - ); - - /* eda.sys_ClientUrl - .request('https://ext.lceda.cn/api/v1/extensions/his_version_list?bizKey=', 'GET') + eda.sys_ClientUrl + .request('https://leye.dragon.edu.kg/release/eext.ver.json', 'GET') .then((response) => response.json()) .then((data) => { - if (data && data.code === 0) { - const his_list = data.result; - const latestVersion = his_list[0].version; + if (data) { + const his_list = data.versions; + const latestVersion = his_list[0].ver; const currentVersion = document.getElementById('version').textContent.replace('V', ''); // 比较版本号,latestVersion 和 currentVersion const latestParts = latestVersion.split('.').map(Number); @@ -251,7 +246,7 @@ if (isNewVersionAvailable) { eda.sys_Message.showToastMessage(`😋 有新版本可用: V${latestVersion}`, ESYS_ToastMessageType.INFO); document.getElementById('tip').innerHTML = - `前往更新新版本`; + `前往更新新版本`; } else { eda.sys_Message.showToastMessage('👍 当前已是最新版本', ESYS_ToastMessageType.SUCCESS); } @@ -262,7 +257,7 @@ undefined, undefined, '去瞅一眼', - "eda.sys_Window.open('https://ext.lceda.cn/item/fangs233/fangs-hyper-export')", + "eda.sys_Window.open('https://lrurl.top/LeyeEEXT')", ); } }) @@ -274,9 +269,9 @@ undefined, undefined, '去瞅一眼', - "eda.sys_Window.open('https://ext.lceda.cn/item/fangs233/fangs-hyper-export')", + "eda.sys_Window.open('https://lrurl.top/LeyeEEXT')", ); - }); */ + }); }); document.getElementById('afdian').addEventListener('click', function (event) { diff --git a/iframe/css/index.css b/iframe/css/index.css index c284835..7004e7f 100644 --- a/iframe/css/index.css +++ b/iframe/css/index.css @@ -709,6 +709,10 @@ video { display: flex; } +.inline-flex { + display: inline-flex; +} + .table { display: table; } @@ -745,6 +749,19 @@ video { display: none; } +.size-1 { + width: 0.25rem; + height: 0.25rem; +} + +.h-0 { + height: 0px; +} + +.h-0\.5 { + height: 0.125rem; +} + .h-1 { height: 0.25rem; } @@ -757,10 +774,22 @@ video { height: 200px; } +.h-\[250px\] { + height: 250px; +} + +.h-full { + height: 100%; +} + .min-h-screen { min-height: 100vh; } +.w-1 { + width: 0.25rem; +} + .w-12 { width: 3rem; } @@ -813,10 +842,18 @@ video { width: 24rem; } +.w-\[250px\] { + width: 250px; +} + .w-\[400px\] { width: 400px; } +.w-\[450px\] { + width: 450px; +} + .w-\[5\%\] { width: 5%; } @@ -879,6 +916,10 @@ video { grid-template-columns: repeat(2, minmax(0, 1fr)); } +.grid-cols-3 { + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + .flex-col { flex-direction: column; } @@ -903,6 +944,10 @@ video { justify-content: space-between; } +.gap-2 { + gap: 0.5rem; +} + .gap-3 { gap: 0.75rem; } @@ -943,6 +988,12 @@ video { margin-bottom: calc(0.125rem * var(--tw-space-y-reverse)); } +.space-y-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} + .space-y-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); @@ -1010,6 +1061,10 @@ video { border-width: 0px; } +.border-2 { + border-width: 2px; +} + .border-b { border-bottom-width: 1px; } @@ -1022,6 +1077,15 @@ video { border-top-width: 1px; } +.border-dashed { + border-style: dashed; +} + +.border-blue-100 { + --tw-border-opacity: 1; + border-color: rgb(219 234 254 / var(--tw-border-opacity, 1)); +} + .border-blue-600 { --tw-border-opacity: 1; border-color: rgb(37 99 235 / var(--tw-border-opacity, 1)); @@ -1087,6 +1151,11 @@ video { background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)); } +.bg-gray-600 { + --tw-bg-opacity: 1; + background-color: rgb(75 85 99 / var(--tw-bg-opacity, 1)); +} + .bg-green-600 { --tw-bg-opacity: 1; background-color: rgb(22 163 74 / var(--tw-bg-opacity, 1)); @@ -1115,6 +1184,11 @@ video { --tw-bg-opacity: 0.5; } +.object-cover { + -o-object-fit: cover; + object-fit: cover; +} + .p-1 { padding: 0.25rem; } @@ -1346,6 +1420,11 @@ video { color: rgb(22 163 74 / var(--tw-text-opacity, 1)); } +.text-orange-600 { + --tw-text-opacity: 1; + color: rgb(234 88 12 / var(--tw-text-opacity, 1)); +} + .text-red-500 { --tw-text-opacity: 1; color: rgb(239 68 68 / var(--tw-text-opacity, 1)); @@ -1375,12 +1454,22 @@ video { color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1)); } +.opacity-50 { + opacity: 0.5; +} + .shadow { --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } +.shadow-\[0_0_8px_rgba\(59\2c 130\2c 246\2c 0\.8\)\] { + --tw-shadow: 0 0 8px rgba(59,130,246,0.8); + --tw-shadow-colored: 0 0 8px var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + .shadow-inner { --tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); --tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color); @@ -1429,6 +1518,11 @@ video { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } +.invert { + --tw-invert: invert(100%); + filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); +} + .filter { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); } @@ -1483,6 +1577,11 @@ video { background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1)); } +.hover\:bg-gray-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity, 1)); +} + .hover\:bg-green-700:hover { --tw-bg-opacity: 1; background-color: rgb(21 128 61 / var(--tw-bg-opacity, 1)); @@ -1508,6 +1607,11 @@ video { color: rgb(30 64 175 / var(--tw-text-opacity, 1)); } +.hover\:text-gray-600:hover { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity, 1)); +} + .hover\:text-red-700:hover { --tw-text-opacity: 1; color: rgb(185 28 28 / var(--tw-text-opacity, 1)); diff --git a/iframe/import.html b/iframe/import.html index 04e4c42..15b8adc 100644 --- a/iframe/import.html +++ b/iframe/import.html @@ -11,8 +11,11 @@ #fixed-window { width: 1280px; height: 680px; border: 1px solid #e5e7eb; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); } .table-container { height: calc(680px - 160px - 64px); overflow-y: auto; } .sticky-header { position: sticky; top: 0; z-index: 10; } + @keyframes scan { 0% { top: 0; } 100% { top: 100%; } } + .scanning #scan-line { display: block; animation: scan 2s linear infinite; } +