diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e88c09..77eda5c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 1.1.1
+
+修复板子大小精度问题,自动识别将保留两位小数
+
# 1.1.0
1. 支持自动识别板子层数
diff --git a/extension.json b/extension.json
index 175bd63..ce91614 100644
--- a/extension.json
+++ b/extension.json
@@ -3,7 +3,7 @@
"uuid": "817c3321fba54f70b0186500933ed47b",
"displayName": "捷配下单助手",
"description": "一键前往捷配下单 PCB,支持保存下单偏好",
- "version": "1.1.0",
+ "version": "1.1.1",
"publisher": "Mr_Fang",
"engines": {
"eda": "^2.3.0"
diff --git a/iframe/order_iframe.html b/iframe/order_iframe.html
index 5cf571c..c9a1b11 100644
--- a/iframe/order_iframe.html
+++ b/iframe/order_iframe.html
@@ -251,6 +251,7 @@
class="w-16 p-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm"
id="BoardWidth"
type="number"
+ step="0.01"
value="10"
/>
CM × 宽(y)
@@ -258,6 +259,7 @@
class="w-16 p-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm"
id="BoardHeight"
type="number"
+ step="0.01"
value="10"
/>
CM,数量
@@ -1532,8 +1534,8 @@
const BBox = await eda.pcb_Primitive.getPrimitivesBBox([selectedPrimitives[0].getState_PrimitiveId()]);
const boardHeight = eda.sys_Unit.milToMm(BBox.maxY - BBox.minY - 10) / 10;
const boardWidth = eda.sys_Unit.milToMm(BBox.maxX - BBox.minX - 10) / 10;
- document.getElementById('BoardHeight').value = boardHeight;
- document.getElementById('BoardWidth').value = boardWidth;
+ document.getElementById('BoardHeight').value = boardHeight.toFixed(2);
+ document.getElementById('BoardWidth').value = boardWidth.toFixed(2);
eda.sys_Message.showToastMessage('已自动识别板子大小', 'success');
} else {
eda.sys_Message.showToastMessage('所选图元非板框', 'error');