Vue - Alerts
How do I make an vue - alerts?
What is a vue - alerts? How do you make a vue - alerts? This script and codes were developed by Kevin Sherman on 14 September 2022, Wednesday.
Vue - Alerts - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Vue - Alerts</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <alert> <strong>General!</strong> Your account has been updated.
</alert>
<alert type="error"> <strong>Error!</strong> Your account has been updated.
</alert>
<alert type="success"> <strong>Success!</strong> Your account has been updated.
</alert>
<template id="alert-template"> <div :class="alertClasses" v-show="show"> <slot></slot> <span class="alert__close" @click="show = false">X</span <div>
</template> <script src='https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Vue - Alerts - Script Codes CSS Codes
.alert { padding: 2rem; background-color: #eee; border: 1px solid #bbbbbb; position: relative; margin-bottom: 0.5rem;
}
.alert--error { background: #f5d6d6; border: 2px solid #d65c5c;
}
.alert--success { background: #e6ffe6; border: 2px solid #00b300;
}
.alert__close { position: absolute; top: 0.75rem; right: 1rem; font-size: 1.15rem; cursor: pointer; padding: 0.5rem;
}
Vue - Alerts - Script Codes JS Codes
Vue.component('alert', { template: '#alert-template', props: ['type'], data: function() { return { show: true }; }, computed: { alertClasses: function() { var type = this.type; return { 'alert': true, 'alert--success': type == 'success', 'alert--error': type == 'error', } } }
});
new Vue({ el: 'body',
})
Developer | Kevin Sherman |
Username | ksherman |
Uploaded | September 14, 2022 |
Rating | 3 |
Size | 2,398 Kb |
Views | 34,408 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Inquiry Form Test | 13,131 Kb |
Mobile floating menu | 3,091 Kb |
Major Card | 3,237 Kb |
Responsive Directory Table | 12,036 Kb |
Site Header | 3,300 Kb |
Calendar Feed | 2,607 Kb |
Degree Search with AngularJS | 6,810 Kb |
QCore Order Entry | 3,136 Kb |
BenU - Campus Life Experience | 7,137 Kb |
Degree Map | 3,137 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Simple Responsive Text | Fbrz | 2,282 Kb |
Ball Physics | Getsetbro | 3,149 Kb |
Base64 SVG Me | MrBambule | 44,786 Kb |
Coming Soon | MariamMassadeh | 1,680 Kb |
IE flex collapse bug fix | Rowno | 2,678 Kb |
Ball bouncing loading animation | Adam2326 | 3,144 Kb |
Social Profiles | Lachlanjc | 1,939 Kb |
Count checked checkboxes with jQuery | Mestika | 2,343 Kb |
Sticky footer testing | 75th | 1,649 Kb |
Fun form with currentColor | Bnthor | 2,713 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!