Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
vs-alert
Advanced tools
Readme
A light weight vue plugin built groundup.
Code Sandbox Demo: Link
Code Sandbox: Link
npm i vs-alert
yarn add vs-alert
<template>
<vs-alert type="success">
Success
</vs-alert>
</template>
<script>
import VsAlert from 'vs-alert';
export default {
components: {
VsAlert,
},
};
</script>
<script src="https://unpkg.com/vs-alert@1.2.73/dist/vs-alert.min.js"></script>
<template>
<vs-alert type="success">
Success
</vs-alert>
</template>
Nuxt Code Snippet
After installation,
Create a file /plugins/vs-alert.js
import Vue from 'vue';
import VsAlert from 'vs-alert';
Vue.component('vs-alert', VsAlert);
Update nuxt.config.js
module.exports = {
...
plugins: [
{ src: '~plugins/vs-alert', mode: 'client' }
...
]
}
In the page/ component
<template>
<vs-alert type="success">
Success
</vs-alert>
</template>
Note
<no-ssr>...</no-ssr>
tag.import VsAlert from 'vs-alert'
& add in component:{VsAlert}
and use it within component, without globally installing in plugin folder.Name | Type | Default | Description |
---|---|---|---|
type | String | - | Type of alert to be shown. (success, warning, error, info) |
title | String | - | The alert title (text only). For HTML, use the header slot. |
showClose | Boolean | - | Show alert close icon |
Name | Description |
---|---|
close | Emitted when the alert close icons is clicked. Listen for it using @close . |
You can define own item markup via slots:
Name | Description |
---|---|
(default) | Holds the alert content and can contain HTML. |
FAQs
A simple vue alert.
We found that vs-alert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.