From 387fdc6d364145a1445ca9d5809614f865091d0d Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期五, 31 十月 2025 16:44:15 +0800
Subject: [PATCH] 优化

---
 components/mold.vue |   37 ++++++++++++++++++++++++++++++-------
 1 files changed, 30 insertions(+), 7 deletions(-)

diff --git a/components/mold.vue b/components/mold.vue
index cd37580..7238f47 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -14,10 +14,13 @@
             <!-- 鏂板锛氬鍛芥瘮棰勮鍊艰緭鍏ユ -->
             <view class="form-cell">
                 <label class="form-label">瀵垮懡姣旈璀﹀�硷細</label>
-                <input class="input small-font"
-                       v-model="lifeWarnInput"
-                       placeholder="濡�0.9鎴�90鎴�90%"
-                       :disabled="!selectedToolNo || loadingForm" />
+                <view class="input-with-suffix">
+                    <input class="input small-font"
+                           v-model="lifeWarnInput"
+                           placeholder="濡�0.9鎴�90"
+                           :disabled="!selectedToolNo || loadingForm" />
+                    <span class="input-suffix">%</span>
+                </view>
             </view>
             <view class="form-cell">
                 <label class="form-label">鍒�鍏峰悕绉帮細</label>
@@ -303,7 +306,7 @@
                 if (tool.lifeWarn !== undefined && tool.lifeWarn !== null) {
                     // 鏍煎紡鍖栦负鐧惧垎姣斿瓧绗︿覆
                     const warn = Number(tool.lifeWarn);
-                    this.lifeWarnInput = warn <= 1 ? `${(warn * 100).toFixed(0)}%` : `${warn.toFixed(0)}%`;
+                    this.lifeWarnInput = warn <= 1 ? (warn * 100).toFixed(0) : warn.toFixed(0);
                 } else {
                     this.lifeWarnInput = '';
                 }
@@ -570,7 +573,7 @@
                         // 鏂板锛氳嚜鍔ㄥ~鍏呭鍛芥瘮棰勮鍊�
                         if (order.modlLifeWorning !== undefined && order.modlLifeWorning !== null) {
                             const warn = Number(order.modlLifeWorning);
-                            this.lifeWarnInput = warn <= 1 ? `${(warn * 100).toFixed(0)}%` : `${warn.toFixed(0)}%`;
+                            this.lifeWarnInput = warn <= 1 ? (warn * 100).toFixed(0) : warn.toFixed(0);
                         } else {
                             this.lifeWarnInput = '';
                         }
@@ -666,7 +669,7 @@
 
         /* 鏂板锛氬皬瀛椾綋鏍峰紡 */
         .input.small-font {
-            font-size: 0.7vw; /* 璋冨皬瀛椾綋 */
+            font-size: 1vw; /* 璋冨皬瀛椾綋 */
         }
 
     .form-select {
@@ -934,4 +937,24 @@
     .tool-desc {
         margin-top: 2vh;
     }
+
+    .input-with-suffix {
+        position: relative;
+        display: flex;
+        align-items: center;
+    }
+
+        .input-with-suffix .input {
+            width: 10vw;
+            margin-right: 8px;
+            padding-right: 24px; /* 涓哄悗缂�鐣欏嚭绌洪棿 */
+        }
+
+    .input-suffix {
+        position: absolute;
+        right: 16px; /* 璋冩暣鍒拌緭鍏ユ鍐呭彸渚� */
+        color: #666;
+        font-size: 0.9vw;
+        pointer-events: none; /* 闃叉骞叉壈杈撳叆 */
+    }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3