Skip to content

Commit

Permalink
fix: 事件动作触发Toast移动端样式失效问题 (#11075)
Browse files Browse the repository at this point in the history
  • Loading branch information
allenve authored Oct 18, 2024
1 parent 1e5b057 commit cf86d4f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/amis-core/src/actions/ToastAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
);
}
}
Expand Down
16 changes: 16 additions & 0 deletions packages/amis-ui/scss/components/_toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down
7 changes: 7 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ export default defineConfig({
target: 'esnext'
}
},
css: {
preprocessorOptions: {
scss: {
silenceDeprecations: ['legacy-js-api']
}
}
},
server: {
host: '0.0.0.0',
port: 8888
Expand Down

0 comments on commit cf86d4f

Please sign in to comment.