From 069eb5fc9c297241a23af8365d320ac4c90acd1c Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 15 Mar 2023 19:38:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/form/button.js | 14 +++++++++++--- 开发规范.md | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/form/button.js b/src/form/button.js index 828dd59..a43abf2 100644 --- a/src/form/button.js +++ b/src/form/button.js @@ -142,10 +142,18 @@ class Button extends Component { box-shadow: 0 0 0 2px var(--color-plain-a); } - $colors: 'teal', 'blue', 'green', 'orange', 'red', 'dark', 'grey'; + $colors: ( + primary: 'teal', + info: 'blue', + success: 'green', + warning: 'orange', + danger: 'red', + secondary: 'dark', + help: 'grey' + ); - @each $c in $colors { - :host([#{$c}]) { + @loop $t, $c in $colors { + :host([type='#{$t}']) { button { color: var(--color-#{$c}-2); border: 1px solid var(--color-#{$c}-2); diff --git a/开发规范.md b/开发规范.md index 67bc727..34e61d9 100644 --- a/开发规范.md +++ b/开发规范.md @@ -9,7 +9,7 @@ - `type=info` 蓝色 - `type=success` 绿色 - `type=warning` 橙色 - - `type=error` 红色 + - `type=danger` 红色 - `type=help` 灰色 3. 尺寸, 主要指 高度