diff --git a/Readme.md b/Readme.md index 0bc6ec7..875a91e 100644 --- a/Readme.md +++ b/Readme.md @@ -36,7 +36,7 @@ - [ ] `wc-cascadar`表单组件-多级联动 - [x] `wc-switch`表单组件-开关 - [x] `wc-icon`图标组件 -- [ ] `wc-layer` 弹层组件 +- [x] `wc-layer` 弹层组件 - [x] `wc-markd`markdown 组件 - [ ] `wc-meditor`md 文本编辑器 - [ ] `wc-neditor`富文本编辑器 @@ -51,6 +51,7 @@ - [ ] `wc-progress`进度条组件 - [ ] `wc-tree`树形菜单组件 - [ ] `wc-uploader`上传组件 +- [ ] `wc-notify`通知组件 ### 测试预览 diff --git a/src/notify/index.js b/src/notify/index.js new file mode 100644 index 0000000..fb0a875 --- /dev/null +++ b/src/notify/index.js @@ -0,0 +1,33 @@ +/** + * {通知组件} + * @author yutent + * @date 2023/04/10 17:17:10 + */ + +import { css, html, Component, bind, styleMap } from '@bd/core' + +class Notify extends Component { + static props = { + title: '', + content: '' + } + + render() { + return html`
` + } +} + +Notify.reg('notify') + +function notify(title = '通知', { icon, body }) { + // + let elem = document.createElement('wc-notify') + + elem.title = title + elem.icon = icon + elem.content = body + + document.body.append(elem) +} + +window.notify = notify