[comp: Alert]: add Alert component
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
What does the proposed API look like?
props
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
message | 提示内容 | String | - |
description | 提示的辅助性文字介绍 | String | - |
type | 提示类型 success 、info 、 warning 、error |
String | info , banner 模式下默认值为warning |
closeable | 是否显示关闭按钮 | Boolean | false |
banner | 是否用作顶部公告 | Boolean | false |
showIcon | 是否显示辅助图标 | Boolean | false ,banner 模式下默认值为 true |
事件
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
onClose | 关闭事件 | Function | - |
afterClose | 关闭动画结束后触发的事件 | Function | - |
slot
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
action | 自定义操作项 | - | - |
message | 提示内容 | - | - |
description | 辅助性介绍 | - | - |
icon | 自定义图标 | - | - |
closeText | 自定义关闭按钮 | - | - |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (8 by maintainers)
Top Results From Across the Web
How to use Alert Component in ReactJS? - GeeksforGeeks
We can use Alert Component in ReactJS using the following approach. Creating React Application And Installing Module:.
Read more >How to Build a Custom Alert Component Using SvelteKit and ...
https://everythingsvelte.com/ ; 00:00 - Intro ; 01:20 - SvelteKit Project Setup with Tailwind CSS ; 05:15 - Run the SvelteKit Project ; 05:35...
Read more >React : Firing a custom alert from multiple components using ...
React : Firing a custom alert from multiple components using an existing component having its own styles ; <span className='text-xl inline-block ...
Read more >Create a custom React alert message - LogRocket Blog
Review popular frameworks for building alert messages in React, then build your own custom alert message from scratch.
Read more >Alerts - Bootstrap
Alerts are available for any length of text, as well as an optional dismiss button. For proper styling, use one of the eight...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ok .那就去掉
afterClose
。主要有以下几点建议:
useGlobalConfig
ix-icon
组件即可