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 fc12f581c1fa139657ba6d2e072c7f2db01e23e0..a5652c0f7816530aa5d13857306a285640e01350 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 8c6c74242471e7705bb63fa30dc0db0a71677da5..2305693f11b5dc5ad8bffec6bb0f939ca4dfe9e1 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 458161ec242941d01f5a0d5a0fa7ccfb2bd86c53..c77e05dcff1d357a8ea88808d4efcc72bc3ab6d6 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 806f180b8c6ec1c41d053701b6d78acfb3e54962..7c70fa94d906399ae889503967a98c70387b3370 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