From e85dba4a3a76bb09d7da48df0aa1f5836e2aa228 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 12 十一月 2025 15:10:39 +0800
Subject: [PATCH] computed 新增

---
 components/mold.vue |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/components/mold.vue b/components/mold.vue
index 735e71d..81130d0 100644
--- a/components/mold.vue
+++ b/components/mold.vue
@@ -10,7 +10,12 @@
                 </view>
                 <view class="form-cell">
                     <label class="form-label">璁剧疆浣跨敤涓婇檺锛�</label>
-                    <input class="input small-font" type="number" v-model="useLimitInput" placeholder="姣忔鎹㈠垁鍚庢墜濉�" :disabled="!selectedToolNo || loadingForm" />
+                    <input class="input big-font"
+                           :class="useLimitColorClass"
+                           type="number"
+                           v-model="useLimitInput"
+                           placeholder="姣忔鎹㈠垁鍚庢墜濉�"
+                           :disabled="!selectedToolNo || loadingForm" />
                 </view>
                 <view class="form-cell">
                     <label class="form-label">瀵垮懡姣旈璀﹀�硷細</label>
@@ -164,6 +169,13 @@
         computed: {
             totalPages() {
                 return Math.max(1, Math.ceil(this.total / this.pageSize) || 1);
+            },
+            useLimitColorClass() {
+                const v = Number(this.useLimitInput);
+                if (!v || isNaN(v)) return '';
+                if (v < 50) return 'limit-danger';
+                if (v < 100) return 'limit-warning';
+                return 'limit-safe';
             }
         },
         watch: {

--
Gitblit v1.9.3