# veil-notifications

> Vue3 通知组件

Latest version **0.0.16** (published 2021-07-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install veil-notifications
pnpm add veil-notifications
yarn add veil-notifications
bun add veil-notifications
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.16 |
| Published | 2021-07-14 |
| First published | 2021-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 64.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | apm29 |
| Maintainers | apm29 |
| Keywords | notification, 通知 |

## Links

- npm: https://www.npmjs.com/package/veil-notifications
- Repository: git@github.com:apm29/veil-notifications
- Homepage: https://github.com/apm29/veil-notifications
- Issues: https://github.com/apm29/veil-notifications/issues
- npm.io page: https://npm.io/package/veil-notifications

## Dependencies (1)

- [veil-transitions](https://npm.io/package/veil-transitions.md) ^0.0.6

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.0.16 (latest) — 2021-07-14
- 0.0.15 — 2021-07-14
- 0.0.13 — 2021-07-14
- 0.0.12 — 2021-07-05
- 0.0.11 — 2021-07-05
- 0.0.2 — 2021-07-01
- 0.0.1 — 2021-07-01

## README

### INSTALL

```shell
yarn add veil-notifications
```
```shell
npm install veil-notification --save
```

### USAGE
1.首先在全局组件中放置`VeilNotifications`组件,一般就放置在`App.vue`,引入css文件
```vue
<template>
  <router-view></router-view>
  <VeilNotifications/>
</template>

<script>
import { VeilNotifications } from 'veil-notifications'
import "veil-notifications/dist/index.css"
export default {
  
}
</script>
```

2.在代码中发送通知
```javascript
import { notification } from "veil-notifications"

notification.success("I'm message content")
```


### API

`notification` 挂载了四个函数,分别是success/warning/info/error,参数都是一样的

* message, //消息内容
* duration = 2500, //持续时间
* group = "tr", //位置: tl tr tc 左上 右上 顶部居中  bl br bc 左下 右下 底部居中
* data, //data参数,会在点击时传递给`onNotificationClick`
* onNotificationClick //点击事件

---
_Source: https://npm.io/package/veil-notifications · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
