0👍
The monted is still running after the login form is removed from DOM. Try to add a boolean variable like this:
export default {
data() {
return {
isLoggedIn: false,
isAnimated: false,
}
},
mounted() {
if (this.isAnimated) {
// animation code here
}
},
methods: {
login() {
// authorization logic here
this.isLoggedIn = true;
this.isAnimated = true;
it’s not the correctly but i believe it’s works, if not working send your code here
- [Vuejs]-How to conditionally set a data-attribute in vue3?
- [Vuejs]-How to pass properties of a slot from child to parent
Source:stackexchange.com