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