Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lightapis/vue-simple-message
A Vue component that displays notification messages
https://github.com/lightapis/vue-simple-message
component message plugin vue
Last synced: 7 days ago
JSON representation
A Vue component that displays notification messages
- Host: GitHub
- URL: https://github.com/lightapis/vue-simple-message
- Owner: LightAPIs
- License: mit
- Created: 2023-09-30T16:29:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-06T14:41:27.000Z (9 months ago)
- Last Synced: 2024-10-14T02:48:40.200Z (about 1 month ago)
- Topics: component, message, plugin, vue
- Language: Vue
- Homepage: https://www.npmjs.com/package/vue-simple-message
- Size: 70.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-simple-message
## Installation
```shell
npm install vue-simple-message
```## Usage
in `.js`/`.ts` file:
```typescript
import SimpleMessage from 'vue-simple-message';// ...
app.use(SimpleMessage)
// ...
```in `.vue` file:
```html
import { ref } from 'vue';
const list = ref([]);
```
or
```html
import { ref } from 'vue';
import type { NotificationItem } from 'vue-simple-message';const list = ref<NotificationItem[]>([]);
function onClose(id: string) {
// ...
}```
### Types
```typescript
type NotificationType = 'info' | 'warn' | 'error' | 'debug';interface NotificationItem {
id: string;
type: NotificationType;
content: string;
}
```## License
[MIT](./LICENSE)