From f09dd3f3a85bd824aa5f0f7d915fdb113bbb0462 Mon Sep 17 00:00:00 2001 From: jxd <18921483103@qq.com> Date: Mon, 6 Dec 2021 18:25:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=80=90Alter&Toast=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E5=B1=9E=E6=80=A7type=E7=9A=84=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E5=80=BC=E5=BB=BA=E8=AE=AE=E7=BB=9F=E4=B8=80=EF=BC=8C=E6=8A=8A?= =?UTF-8?q?toast=E4=B8=AD=E7=9A=84warn=E6=94=B9=E4=B8=BAwarning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devui/toast/src/hooks/use-toast-helper.ts | 2 +- packages/devui-vue/devui/toast/src/toast-image.tsx | 2 +- packages/devui-vue/devui/toast/src/toast-types.ts | 2 +- packages/devui-vue/docs/components/toast/index.md | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/devui-vue/devui/toast/src/hooks/use-toast-helper.ts b/packages/devui-vue/devui/toast/src/hooks/use-toast-helper.ts index fc12f581..a5652c0f 100644 --- a/packages/devui-vue/devui/toast/src/hooks/use-toast-helper.ts +++ b/packages/devui-vue/devui/toast/src/hooks/use-toast-helper.ts @@ -3,7 +3,7 @@ import { Message } from '../src/toast.type' export function useToastHelper() { function severityDelay(msg: Message) { switch (msg.severity) { - case 'warn': + case 'warning': case 'error': return 10e3 default: diff --git a/packages/devui-vue/devui/toast/src/toast-image.tsx b/packages/devui-vue/devui/toast/src/toast-image.tsx index 8c6c7424..2305693f 100644 --- a/packages/devui-vue/devui/toast/src/toast-image.tsx +++ b/packages/devui-vue/devui/toast/src/toast-image.tsx @@ -16,7 +16,7 @@ export default defineComponent({ const severityIconMap = { info: 'info-o', success: 'right-o', - warn: 'warning-o', + warning: 'warning-o', error: 'error-o' } diff --git a/packages/devui-vue/devui/toast/src/toast-types.ts b/packages/devui-vue/devui/toast/src/toast-types.ts index 458161ec..c77e05dc 100644 --- a/packages/devui-vue/devui/toast/src/toast-types.ts +++ b/packages/devui-vue/devui/toast/src/toast-types.ts @@ -1,7 +1,7 @@ import type { CSSProperties, ExtractPropTypes, PropType, h } from 'vue' export type IToastLifeMode = 'single' | 'global' -export type IToastSeverity = 'common' | 'success' | 'error' | 'warn' | 'info' | string +export type IToastSeverity = 'common' | 'success' | 'error' | 'warning' | 'info' | string export type IToastSeverityConfig = { color: string; icon: string; } export interface Message { diff --git a/packages/devui-vue/docs/components/toast/index.md b/packages/devui-vue/docs/components/toast/index.md index 806f180b..7c70fa94 100644 --- a/packages/devui-vue/docs/components/toast/index.md +++ b/packages/devui-vue/docs/components/toast/index.md @@ -25,7 +25,7 @@ common 时不展示图标。 >Success WarnWarning ErrorSuccess - WarnWarning Error