From 3b8822437c761c5c73025244bd1c5e08cd3ba69b Mon Sep 17 00:00:00 2001 From: liuxiaodi <740191337@qq.com> Date: Thu, 9 Dec 2021 21:50:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtoast=E4=B8=ADicon?= =?UTF-8?q?=E4=B8=8Etitle=E5=AF=B9=E9=BD=90=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtoast=E6=96=87=E6=A1=A3=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=8Cbutton=E7=BB=84=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0success=E5=92=8Cwarning=E5=9F=BA=E7=A1=80=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devui-vue/devui/button/src/button.scss | 12 ++++++- .../devui-vue/devui/toast/src/toast-image.tsx | 2 +- packages/devui-vue/devui/toast/src/toast.scss | 3 +- .../devui-vue/docs/components/toast/index.md | 32 +++++++++---------- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/packages/devui-vue/devui/button/src/button.scss b/packages/devui-vue/devui/button/src/button.scss index 1577e7ab..a29c6266 100644 --- a/packages/devui-vue/devui/button/src/button.scss +++ b/packages/devui-vue/devui/button/src/button.scss @@ -56,6 +56,16 @@ $devui-btn-normal-config: ( min-width: $devui-btn-min-width, background-color: $devui-contrast ), + success: ( + color: $devui-light-text, + min-width: $devui-btn-min-width, + background-color: $devui-success + ), + warning: ( + color: $devui-light-text, + min-width: $devui-btn-min-width, + background-color: $devui-warning + ), xs: ( padding: $devui-btn-xs-padding, height: $devui-btn-xs-height, @@ -172,7 +182,7 @@ $devui-btn-pseudo-config: ( border-width: 1px; border-color: transparent; background-color: transparent; - @each $type in text, text-dark, common, stress, primary, danger, left, right, xs, sm, lg { + @each $type in text, text-dark, common, stress, primary, danger, success, warning, left, right, xs, sm, lg { &.devui-btn-#{$type} { @each $key, $value in map-get($devui-btn-normal-config, $type) { #{$key}: $value; diff --git a/packages/devui-vue/devui/toast/src/toast-image.tsx b/packages/devui-vue/devui/toast/src/toast-image.tsx index 2305693f..9bf97f2f 100644 --- a/packages/devui-vue/devui/toast/src/toast-image.tsx +++ b/packages/devui-vue/devui/toast/src/toast-image.tsx @@ -22,6 +22,6 @@ export default defineComponent({ const showIcon = () => severity !== 'common' - return {showIcon() ? : null} + return {showIcon() ? : null} } }) diff --git a/packages/devui-vue/devui/toast/src/toast.scss b/packages/devui-vue/devui/toast/src/toast.scss index 3f8c2512..081257af 100644 --- a/packages/devui-vue/devui/toast/src/toast.scss +++ b/packages/devui-vue/devui/toast/src/toast.scss @@ -79,8 +79,9 @@ height: 16px; border-radius: 50%; left: 16px; - top: 10px; + top: 14px; padding: 0; + line-height: 1; &.devui-toast-image-warn i.icon { color: $devui-warning !important; diff --git a/packages/devui-vue/docs/components/toast/index.md b/packages/devui-vue/docs/components/toast/index.md index 7c70fa94..4f63a0c8 100644 --- a/packages/devui-vue/docs/components/toast/index.md +++ b/packages/devui-vue/docs/components/toast/index.md @@ -21,26 +21,26 @@ common 时不展示图标。 > - Success - Warning - Error - Multiple - link - link + pure text - common - no title @@ -139,16 +139,16 @@ export default defineComponent({