From 8e9bc97e709f7e49586dffb9cc3d2dac4cfef4ca Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 26 三月 2026 10:13:02 +0800
Subject: [PATCH] 进销存升级 1.语法修改

---
 src/components/PIMTable/PIMTable.vue |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 1a2ef5d..8e22459 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -189,7 +189,6 @@
                 :disabled="isOperationDisabled(o, scope.row)"
                 :style="{
                   color: getOperationColor(o, scope.row),
-                  fontWeight: 'bold',
                 }"
                 >{{ o.name }}</el-button
               >
@@ -368,11 +367,11 @@
     return format(val);
   } else return val;
 };
+const validTagTypes = ["primary", "success", "info", "warning", "danger"];
 
 const formatType = (val, format) => {
-  if (typeof format === "function") {
-    return format(val);
-  } else return "";
+  const type = typeof format === "function" ? format(val) : undefined;
+  return validTagTypes.includes(type) ? type : undefined;
 };
 
 const isOperationDisabled = (operation, row) => {
@@ -430,6 +429,8 @@
   const baseColor =
     operation?.name === "鍒犻櫎" || operation?.name === "delete"
       ? "#D93025"
+      : operation?.name === "璇︽儏"
+      ? "#67C23A"
       : operation?.color || "var(--el-color-primary)";
 
   if (isOperationDisabled(operation, row)) {

--
Gitblit v1.9.3