From 9e322cf8ed0d62124fcd017d6066ecfc50950196 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 19 十二月 2021 14:19:59 +0800
Subject: [PATCH] 2021-12-19

---
 src/menu/components/card/cardcellcomponent/index.jsx |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx
index 3654ee5..ddfe3a1 100644
--- a/src/menu/components/card/cardcellcomponent/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/index.jsx
@@ -591,6 +591,25 @@
     let btn = cards.action[index]
     btn.eleType = 'button'
 
+    if (!btn.width) {
+      btn.width = 12
+    }
+    if (btn.color) {
+      btn.style = btn.style || {}
+      btn.style.color = '#ffffff'
+      if (btn.color === 'primary') {
+        btn.style.backgroundColor = '#1677ff'
+      } else if (btn.color === 'danger') {
+        btn.style.backgroundColor = '#ff3141'
+      } else if (btn.color === 'warning') {
+        btn.style.backgroundColor = '#ff8f1f'
+      } else if (btn.color === 'success') {
+        btn.style.backgroundColor = '#00b578'
+      } else if (btn.color === 'light') {
+        btn.style.backgroundColor = '#cccccc'
+      }
+    }
+
     let _elements = [...this.state.elements, btn]
 
     this.setState({

--
Gitblit v1.8.0