From cf86d4f04ea7fa47608d42fa7306c348133a4c6e Mon Sep 17 00:00:00 2001 From: Allen Date: Fri, 18 Oct 2024 16:01:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=8B=E4=BB=B6=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E8=A7=A6=E5=8F=91Toast=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98=20(#11075)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-core/src/actions/ToastAction.ts | 2 +- packages/amis-ui/scss/components/_toast.scss | 16 ++++++++++++++++ vite.config.ts | 7 +++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/amis-core/src/actions/ToastAction.ts b/packages/amis-core/src/actions/ToastAction.ts index 7d65b997e..268734acb 100644 --- a/packages/amis-core/src/actions/ToastAction.ts +++ b/packages/amis-core/src/actions/ToastAction.ts @@ -41,7 +41,7 @@ export class ToastAction implements RendererAction { event.context.env?.notify?.( action.args?.msgType || 'info', String(action.args?.msg), - action.args + {...action.args, mobileUI: renderer.props.mobileUI} ); } } diff --git a/packages/amis-ui/scss/components/_toast.scss b/packages/amis-ui/scss/components/_toast.scss index 11ed77acd..f0b03343c 100644 --- a/packages/amis-ui/scss/components/_toast.scss +++ b/packages/amis-ui/scss/components/_toast.scss @@ -162,6 +162,22 @@ width: var(--Toast-icon-width); height: var(--Toast-icon-height); color: inherit; + + &.icon-warning { + color: var(--Status-warning-color); + } + + &.icon-fail { + color: var(--Status-fail-color); + } + + &.icon-success { + color: var(--Status-success-color); + } + + &.icon-schedule { + color: var(--Status-schedule-color); + } } } diff --git a/vite.config.ts b/vite.config.ts index c90ada657..e6f3c8923 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -54,6 +54,13 @@ export default defineConfig({ target: 'esnext' } }, + css: { + preprocessorOptions: { + scss: { + silenceDeprecations: ['legacy-js-api'] + } + } + }, server: { host: '0.0.0.0', port: 8888