andyleach / vue-flash Goto Github PK
View Code? Open in Web Editor NEWA flash messaging component for Vue.js
License: MIT License
A flash messaging component for Vue.js
License: MIT License
I love vue-flash, but I think that the .alert-wrap
class should be hidden when the flash message disappears. Currently, it stays invisible on the screen, preventing the user from being able to click anything underneath it on the page.
Here's the lines of the class I'm referring to:
Lines 110 to 115 in a01728c
`ERROR in ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-40d2a988","hasScoped":true,"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./node_modules/vue-flash/src/Flash.vue
(Emitted value instead of an instance of Error)
Error compiling template:
@ ./node_modules/vue-flash/src/Flash.vue 10:23-222
@ ./resources/assets/js/app.js
@ multi ./resources/assets/js/app.js ./resources/assets/less/app.less ./resources/assets/rebrand-styles/less/index.less`
The weird quick fix is to add +0 to the index for the v-for. I'm sure there's a more elegant way of fixing this.
Hello,
I'm trying to use it with Laravel Framework and all I want to do is to flash a message after the user logged in. I can't figure out how to call it from PHP if a session is set. I have tried to call it between the script tag if a session is set and I don't think is best practices to follow.
Thanks
I'm attempting to use the vue-flash component via npm. I have it registered as a global component in my main.js file and can verify that via console.log(Vue.options.components)
. I can also see the event firing in the Vue DevTools (but can't see the component there). My problem is that I don't see any flash message visually in my app.
I have not used globally registered components before, so perhaps I'm missing something obvious?
Here's my test repo for proof (see main.js and HelloWorld component):
https://github.com/sdellis/vue-flash-test
Using laravel for example, how do I pass a message, type & props to this vue component?
Hi, thank for you share this component
I use the laravel5.8, and front-end use the Vuejs2, but I dont know how to use your component in my Vue.
Is there a way to indicate the position where the flash message appears?
@andyleach I just cloned your repo, ran 'npm run dev' and received a compling error
This dependency was not found:
* /var/www/html/tmp/vue-flash/demo/src/app.js in multi ./demo/src/app.js
I changed your webpack.mix.js from
mix.js('demo/src/app.js', 'demo') > mix.js('demo/app.js', 'demo')
then I was able to run 'npm run dev' successfully.
Maybe it's a bug from my app, but when I fire a flash message, the first displayed is not animated. The others are, only if the previous one is still displayed.
See my GIF here.
Thanks !
Possibilities:
If I want to show multiple messages my website hangs (can't click anywhere. Opera and Edge and sometimes Firefox say that there is a script which solows the browser down).
I have to wait after messages are gone.
How to reproduce:
response.data.forEach(function(element) {
flash(element, "success");
});
Hello. Are you still using vue-list and are you going to support it? Very interested in this package name. Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.